Scott David Daniels writes:
> Scott David Daniels wrote:
> > class Initialized(ClassBase):
> > @classmethod
> > def _init_class(class_):
> > class_.a, class_.b = 1, 2
> > super(Initialized, class_)._init_class()
>
> Mea culpa: Here super is _not_ a goo
Scott David Daniels wrote:
...
Look into metaclasses:
...
class Initialized(ClassBase):
@classmethod
def _init_class(class_):
class_.a, class_.b = 1, 2
super(Initialized, class_)._init_class()
Mea culpa: Here super is _not_ a good idea, and I had t
menomnon wrote:
Does python have a ‘once’ (per class) feature?
‘Once’, as I’ve know it is in Eiffel. May be in Java don’t.
The first time you instantiate a given class into an object it
constructs, say, a dictionary containing static information. In my
case static is information that may chan
On Oct 5, 11:07 pm, Carl Banks wrote:
> On Oct 5, 7:56 pm, menomnon wrote:
> > Does python have a ‘once’ (per class) feature?
>
> > ‘Once’, as I’ve know it is in Eiffel. May be in Java don’t.
>
> > The first time you instantiate a given class into an object it
> > constructs, say, a dictionary c
On Oct 5, 7:56 pm, menomnon wrote:
> Does python have a ‘once’ (per class) feature?
>
> ‘Once’, as I’ve know it is in Eiffel. May be in Java don’t.
>
> The first time you instantiate a given class into an object it
> constructs, say, a dictionary containing static information. In my
> case stati
On Mon, Oct 5, 2009 at 7:56 PM, menomnon wrote:
> Does python have a ‘once’ (per class) feature?
In Python, `class` is an executable statement, so you can put whatever
code you want in the class body (along with your method definitions)
and it will be run exactly once, at the time the class is de
Does python have a ‘once’ (per class) feature?
‘Once’, as I’ve know it is in Eiffel. May be in Java don’t.
The first time you instantiate a given class into an object it
constructs, say, a dictionary containing static information. In my
case static is information that may change once a week at