Re: class attribute to instance attribute

2005-07-05 Thread Greg Ewing
Donnal Walter wrote: > Each "presenter" (instance) needs its own "view" (instance). The class > attribute references a wxPython class. The resulting instance attribute > references a wxPython object (widget or container). This is a reasonable idea, but it would be less confusing to give the cla

Re: class attribute to instance attribute

2005-07-01 Thread Devan L
Well, I've never heard of a method like that for assigning variables. I'd rather put it in the __init__ method. -- http://mail.python.org/mailman/listinfo/python-list

Re: class attribute to instance attribute

2005-07-01 Thread Donnal Walter
Devan L wrote: > Why make it an instance attribute? Couldn't you just look at > the class attribute? Each "presenter" (instance) needs its own "view" (instance). The class attribute references a wxPython class. The resulting instance attribute references a wxPython object (widget or container)

Re: class attribute to instance attribute

2005-06-30 Thread Devan L
Why make it an instance attribute? Couldn't you just look at the class attribute? If its something that depends on each instance's value assigned to the attribute, why not make it an instance attribute to start with? -- http://mail.python.org/mailman/listinfo/python-list

class attribute to instance attribute

2005-06-30 Thread Donnal Walter
This is a question about Python patterns or idioms. Over a period of time, I have evolved a pattern of usage that seems to work better for me than other ways I tried previously, but in writing some documentation I don't know what to call this syntax or how best to describe it. I have not seen i