Standing Objects ... possible?
Quinn Dunkan
quinn at spew.ugcs.caltech.edu
Fri Feb 8 01:43:59 EST 2002
More information about the Python-list mailing list
Fri Feb 8 01:43:59 EST 2002
- Previous message (by thread): Standing Objects ... possible?
- Next message (by thread): Standing Objects ... possible?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2 Feb 2002 20:25:52 GMT, Philip Swartzleonard <starx at pacbell.net> 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): pass 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.
- Previous message (by thread): Standing Objects ... possible?
- Next message (by thread): Standing Objects ... possible?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list