Standing Objects ... possible?

Quinn Dunkan quinn at
Fri Feb 8 01:43:59 EST 2002

On 2 Feb 2002 20:25:52 GMT, Philip Swartzleonard <starx at> wrote:
>    	I have this vague idea that this would be useful in the near 
>future, and I was wondering if it was at all possible without recoding 
>the interperter. What i want is a construct like:
>object Foo( ancestor ):
>    	pass
>    	or more likely:
>class Foo( ancestor, standing_mixin ):
>    	pass
>    	to be more or less equivelent to:
>class _Foo( ancestor ):
>    	pass
>Foo = _Foo()
>    	The second option looked easy at one point, but I don't think that 
>I can make it self-initiate... In any case, is there a prefered way of 
>writing hidden stuff like the _Foo for doing it the more possible way?

Well, the obvious is:

class foo(ancestor):
foo = foo()

That'll get the name out of the way at least.  You could also del it, if it's
really causing you aesthetic pain.

I've no clue what you mean by "self-initiate".  Of course, 'foo's __init__
will be called, as always.  I've never heard the term "standing object" before.
If it's something that's obscure, or which you just made up, it could stand a
little more elaboration.

More information about the Python-list mailing list