In article <[EMAIL PROTECTED]>, Roy Smith <[EMAIL PROTECTED]> wrote:
>>Guido sez:
>>
>> __slots__ is a terrible hack with nasty, hard-to-fathom side
>> effects that should only be used by programmers at grandmaster and
>> wizard levels. Unfortunately it has gained an enormous undeserved
Don't optimize prematurely. Write whatever is cleaner, simpler and
makes more sense. Such that if someone (or even yourself) looks at it
10 years from now they'll know exactly what is going on. As far as
what is slower or what functionality you will use and what you won't --
well, if you won't us
>Guido sez:
>
> __slots__ is a terrible hack with nasty, hard-to-fathom side
> effects that should only be used by programmers at grandmaster and
> wizard levels. Unfortunately it has gained an enormous undeserved
> popularity amongst the novices and apprentices, who should know
>
In article <[EMAIL PROTECTED]>,
<[EMAIL PROTECTED]> wrote:
>Aahz, citing Guido:
>>
>>__slots__ is a terrible hack with nasty, hard-to-fathom side
>>effects that should only be used by programmers at grandmaster and
>>wizard levels. Unfortunately it has gained an enormous undeserved
>
>I think I ha
Simon Hibbs wrote:
> I'm wondering about whether to use objects in this way or dictionaries
> for a program I'm writing at the moment. It seems to me that unless you
> need some of the functionality supplied with dictionaries (len(a),
> has_key, etc) then simple objects are a syntacticaly cleaner a
Aahz, citing Guido:
>__slots__ is a terrible hack with nasty, hard-to-fathom side
>effects that should only be used by programmers at grandmaster and
>wizard levels. Unfortunately it has gained an enormous undeserved
I think I have used __slots__ just one time. Can you tell me some of of
such bad
Simon Hibbs:
> It seems to me that unless you
> need some of the functionality supplied with dictionaries (len(a),
> has_key, etc) then simple objects are a syntacticaly cleaner and more
> natural way to express yourself.
I'd say the opposite. Classes contain a dict of their attributes, etc.
So if
In article <[EMAIL PROTECTED]>,
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>In <[EMAIL PROTECTED]>, Guyon Morée
>wrote:
>>
>> I'm using simple classes as a container of named values and I'm
>> instantiating a lot of them in a very short time.
>>
>> i was wondering if there is any benefi
I'm wondering about whether to use objects in this way or dictionaries
for a program I'm writing at the moment. It seems to me that unless you
need some of the functionality supplied with dictionaries (len(a),
has_key, etc) then simple objects are a syntacticaly cleaner and more
natural way to expr
dict is already a classwhy another?
Guyon Morée wrote:
> Hi all,
>
> I'm using simple classes as a container of named values and I'm
> instantiating a lot of them in a very short time.
>
> i was wondering if there is any benefit in using dicts instead from a
> performance/memory usage point
"Guyon Morée" <[EMAIL PROTECTED]> writes:
> I'm using simple classes as a container of named values and I'm
> instantiating a lot of them in a very short time.
>
> i was wondering if there is any benefit in using dicts instead from a
> performance/memory usage point of view?
I recommend you to m
In <[EMAIL PROTECTED]>, Guyon Morée
wrote:
> I'm using simple classes as a container of named values and I'm
> instantiating a lot of them in a very short time.
>
> i was wondering if there is any benefit in using dicts instead from a
> performance/memory usage point of view?
If you really have
12 matches
Mail list logo