Bugs item #1459482, was opened at 2006-03-27 09:51
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1459482&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: SQLObject release (specify)
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Can't access column called 'class' in SQLObject
Initial Comment:
A syntax error is generated when a column named "class"
is accessed using the SQLObject class interface in
SQLObject 0.7.
Example:
The class AltJEDic contains a column named "CLASS" that
should be mapped to the python object AltJEDic.class
class AltJEDic(SQLObject):
class sqlmeta:
fromDatabase = True
#idName = "sqlid"
table = "ALTJEDIC0111"
style = HinokiStyle()
However, when I try to use AltJEDic.class in a function
call, it fails with the following error:
# python verify-wordnet.py
File "verify-wordnet.py", line 190
if isSynonymRelGT(left_altjdic.class,
right_altjdic.class):
^
SyntaxError: invalid syntax
It seems that this is interfering with Python keywords.
Do we need to add a restriction on column (or SQLObject
class member names) or can this be worked around?
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2006-03-27 09:57
Message:
Logged In: NO
I forgot to add some context. I get left_altjdic and
right_altjdic by taking the first results from selectBy()
queries. Ex:
left_altjdics = AltJDic.selectBy(entry=left)
left_altjdic = left_altjdics[0]
try:
right_altjdics = AltJDic.selectBy(entry=right)
right_altjdic = right_altjdics[0]
if isSynonymRelGT(left_altjdic.class, right_altjdic.class):
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2006-03-27 09:55
Message:
Logged In: NO
I forgot to add some context. I get left_altjdic and
right_altjdic by taking the first items from the results of
selectBy() queries as follows:
left_altjdics = AltJDic.selectBy(entry=left)
left_altjdic = left_altjdics[0]
try:
right_altjdics = AltJDic.selectBy(entry=right)
right_altjdic = right_altjdics[0]
if isSynonymRelGT(left_altjdic.class, right_altjdic.class):
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2006-03-27 09:54
Message:
Logged In: NO
I forgot to add some context. I get left_altjdic and
right_altjdic by taking the first items from the results of
selectBy() queries as follows:
left_altjdics = AltJDic.selectBy(entry=left)
left_altjdic = left_altjdics[0]
try:
right_altjdics = AltJDic.selectBy(entry=right)
right_altjdic = right_altjdics[0]
if isSynonymRelGT(left_altjdic.class, right_altjdic.class):
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1459482&group_id=74338
|