The following forum message was posted by burdell2k at http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4364529:
Using Python 2.5 grammar and VM. Using Eclipse Helios and PyDev both fully
patched on Windows XP.
My code: [code]
foo = lambda x: x
class bar(object): pass
The "Problems" box shows the error message:
[code]"Encountered "class" at line 13, column 1. Was expecting one of: "def"
... "@" ...[/code]
The PyDev editor also highlights the word "class" in the declaration of "bar"
in red accordingly (not expected). If I use the def statement instead of the
class statement to create "bar", the compiler does not complain and the text
editor does not highlight anything in red (as expected).
Using decorators on classes, while perhaps unusual, is valid and realistic.
I have implemented a Singleton decorator which creates a singleton subclass
of the given class dynamically and returns it, so that repeated calls to the
factory return the same object, and issubclass() and isinstance() work
I do enjoy PyDev and it is a great help to productivity. I apologize that I
do not have time to work on a patch myself or experiment with non-release SVN
revisions. If there are questions about my settings I will be happy to answer.
Hopefully this report helps to improve the tool for others' benefit. Thank you.