2008/7/23 karthikbalaguru <[EMAIL PROTECTED]>: > I use Redhat 9.0, python-2.2.2-26, python-devel-2.2.2-26 and > db4-4.0.14-20. > > File "/usr/local/SDK/bin/../core/bin/processorlib.py", line 88 > yield ProcessorObjectInfo(child, self.pt) > ^ > SyntaxError: invalid syntax > > Is this error related with the version of python / python-devel that i > use . > Any ideas / tips ?
Yup - generators (and hence the yield statement) were first introduced in Python 2.2, but in order to maintain backward compatibility, you'll need this line in any module using them: from __future__ import generators As of Python 2.3, this is no longer necessary, and I'd imagine that whatever you are running was targeted at a post 2.2 release. -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ GTalk: simon.brunning | MSN: small_values | Yahoo: smallvalues | Twitter: brunns -- http://mail.python.org/mailman/listinfo/python-list