[Python-Dev] Meta-reflections (original) (raw)

Gordon McMillan gmcm@hypernet.com
Wed, 20 Feb 2002 13:27:58 -0500


On 20 Feb 2002 at 8:30, Kevin Jacobs wrote:

Attributes currently have a flat namespace,

Instance attributes do, but that's a tautology.

and the construct that I feel is most natural would maintain that characteristic. e.g.:

class Base: def init(self): self.foo = 1 class Derived(Base): def init(self): Base.init(self) self.foo = 2 # this is the same foo as in Base

But these aren't:

class Base foo = 1

class Derived(Base): foo = 2

-- Gordon http://www.mcmillan-inc.com/