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 @foo class bar(object): pass [/code] 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 as expected. 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. ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ Pydev-users mailing list Pydev-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pydev-users