Standing Objects ... possible?

Andrew Dalke dalke at
Sat Feb 2 17:47:05 EST 2002

Philip Swartzleonard:
>What i want is a construct like:
>object Foo( ancestor ):
>    pass
>    to be more or less equivelent to:
>class _Foo( ancestor ):
>    pass
>Foo = _Foo()

There's no reason you need a new name.  Try this:

  class Spam(ancestor):
  Spam = Spam()

(where I used the more Python appropriate metasyntactic
variable :)

                dalke at

More information about the Python-list mailing list