Colin:
> It seems to me that __new__ should probably be deprecated for mutable
> classes.
Certainly not! It is useful for mutable classes too. One just must be
careful.
Michele Simionato
--
http://mail.python.org/mailman/listinfo/python-list
Michele Simionato wrote:
It would be good to have a clear exposition of the pros and cons of
__new__ usage.
It is there mostly because __init__ would not work on immutable types.
OTOH, you probably do not want to use __new__ on mutable types
(once I was caught by this trap, google for "overriding
> It would be good to have a clear exposition of the pros and cons of
> __new__ usage.
It is there mostly because __init__ would not work on immutable types.
OTOH, you probably do not want to use __new__ on mutable types
(once I was caught by this trap, google for "overriding list.__new__"
if you
Brian van den Broek wrote:
Daniel Bickett said unto the world upon 2005-02-05 19:46:
I was reading the "Pickling and inheritance are making me hurt"
thread, and the latest suggestion (as of this posting) was to do with
the __setstate__ and __getstate__ methods. They caught my attention
[Kirk Strauser]
> I have a module that defines a Search class and a SearchResult class.
Try posting a minimal self-contained code sample that fails.
> I use these classes by writing other modules that subclass both of them as
> needed to interface with particular search engines.
>
> My problem i
Bruno Desthuilliers wrote:
> Well, the fact is that __[get|set]state__() have nothing to do with new
> style classes, but with the Pickle protocol:
> http://www.python.org/doc/2.3.4/lib/pickle-inst.html
Thank you for pointing that out, but all the same ;)
--
Daniel Bickett
dbickett at gmail.com
Daniel Bickett said unto the world upon 2005-02-05 19:46:
I was reading the "Pickling and inheritance are making me hurt"
thread, and the latest suggestion (as of this posting) was to do with
the __setstate__ and __getstate__ methods. They caught my attention
because I hadn't e
Daniel Bickett a écrit :
I was reading the "Pickling and inheritance are making me hurt"
thread, and the latest suggestion (as of this posting) was to do with
the __setstate__ and __getstate__ methods. They caught my attention
because I hadn't encountered them before, and it remi
I was reading the "Pickling and inheritance are making me hurt"
thread, and the latest suggestion (as of this posting) was to do with
the __setstate__ and __getstate__ methods. They caught my attention
because I hadn't encountered them before, and it reminded me that in
the past
Kirk Strauser <[EMAIL PROTECTED]> writes:
> I have a module that defines a Search class and a SearchResult class. I use
> these classes by writing other modules that subclass both of them as needed
> to interface with particular search engines.
>
> My problem is that Search defines a method (cal
On Dé hAoine, Feabh 4, 2005, at 15:48 America/Chicago, Kirk Strauser
wrote:
I have a module that defines a Search class and a SearchResult class.
I use
these classes by writing other modules that subclass both of them as
needed
to interface with particular search engines.
My problem is that S
I have a module that defines a Search class and a SearchResult class. I use
these classes by writing other modules that subclass both of them as needed
to interface with particular search engines.
My problem is that Search defines a method (called automatically by __del__)
to save its results bet
12 matches
Mail list logo