![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.python archiveclass attribute to instance attribute
From: Donnal Walter <donnal@donnal.net>
Date: Thu Jun 30 2005 - 22:50:26 CEST
This is a question about Python patterns or idioms. Over a period of
The somewhat longish version is that I have implemented an MVP
import wx
def __init__(self):
# and more methods to make this a presenter
class Frame:
def __init__(self):
# and more methods to make this a presenter
There are a number of presenters, some of which have the same type of
class Presenter:
def __init__(self):
# and more methods to make this a presenter
class TextField(Presenter):
class Frame(Presenter):
Then:
To summarize, each subclass has a class attribute "view" that is
Is this a common Python idiom? If so, does it have a name? Is there a
Regards,
|