[Python-Dev] Those import related syntax errors again...

Guido van Rossum guido@digicool.com
Wed, 21 Feb 2001 20:46:35 -0500


> For the record, the only reason I had to use exec in that case was because
> the "new" module is not capable creating a new method.  Trying to compile a
> block of code with a "return" statement but no function decl (to create a
> code object suitable for a method) fails at compile time.

I don't understand.  Methods do have a function declaration:

  class C:

      def meth(self):
          pass

Or am I misunderstanding?

--Guido van Rossum (home page: http://www.python.org/~guido/)