class object access in class definition?
Lars Damerow
lars at pixar.com
Thu Mar 8 01:54:05 EST 2001
That's a good compromise. It would have been nice to have everything under the
scope of the class definition, but certainly not crucial.
Thanks!
-lars
On Wed, 7 Mar 2001, Steve Holden wrote:
| Well, if you're prepared to be pragmatic about it, what's wrong with:
|
| derivedClasses = []
|
| class BaseClass:
| pass
|
| class DerivedClass(BaseClass):
| pass
|
| derivedClasses.append(DerivedClass)
|
| Not elegant, but practical.
|
| regards
| Steve
|
|
|
|
___________________________________________________________
lars damerow
button pusher
lars at pixar.com
"Nauseous. Nauseated. The first means 'sickening to contemplate'; the second
means 'sick at the stomach.' Do not, therefore, say, "I feel nauseous," unless
you are sure you have that effect on others."
- William Strunk Jr., "The Elements of Style"
More information about the Python-list
mailing list