In message <8hhm9afbl...@mid.individual.net>, Gregory Ewing wrote: > Lawrence D'Oliveiro wrote: > >> In message <8hfq23fet...@mid.individual.net>, Gregory Ewing wrote: >> >>>How would you intend to enforce such a restriction? >> >> The same way it’s already enforced. > > I don't see how that's possible, except in a very limited and > unreliable way. The compiler would have to be able to determine, > statically, when there was some piece of code that could assign > to a given instance variable of some instance of a class, and > arrange for an "unbound attribute error" to be raised if you > try to reference it before it's been assigned.
If you can’t do it statically, do it dynamically. -- http://mail.python.org/mailman/listinfo/python-list