Standing Objects ... possible?
John J. Lee
jjl at pobox.com
Sat Feb 2 17:04:10 EST 2002
On 2 Feb 2002, Philip Swartzleonard wrote:
[...]
> the interperter. What i want is a construct like:
[...]
> or more likely:
>
> class Foo( ancestor, standing_mixin ):
> pass
>
> to be more or less equivelent to:
>
> class _Foo( ancestor ):
> pass
> Foo = _Foo()
[...]
> 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?
[...]
What is your motivation here? I really can't imagine why you'd want those
two pieces of code to be equivalent! BTW, _name is only a convention: it
is treated by the interpreter in the same way as any other symbol not
starting with a *double* underscore. Double underscore __names are hidden
to some extent.
John
More information about the Python-list
mailing list