[Python-bugs-list] [ python-Bugs-651701 ] Bozo getstate w/ slots overrides base
SourceForge.net
noreply@sourceforge.net
Thu, 22 May 2003 15:09:20 -0700
Bugs item #651701, was opened at 2002-12-10 17:10
Message generated for change (Comment added) made by pafein
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=651701&group_id=5470
Category: Type/class unification
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Peter Fein (pafein)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bozo getstate w/ slots overrides base
Initial Comment:
The bozo __getstate__ set automatically on classes
defining __slots__ overrides any __getstate__ defined
in a base class. This makes writing a mixin to
implement this method impossible.
----------------------------------------------------------------------
>Comment By: Peter Fein (pafein)
Date: 2003-05-22 17:09
Message:
Logged In: YES
user_id=639329
This issue is that although the base class B defines a
__getstate__, the class C2 overrides it b/c it contains
__slots__. Basically, I'm suggesting that base classes
should be checked for getstate instead of only looking at
the class that defines slots before adding the bozo'd version.
Unfortunately, I don't have a 2.3* version to play with at
the moment. Please let me know if this clarifies things.
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2003-05-22 16:58
Message:
Logged In: YES
user_id=33168
What do you expect to be printed? I'm not sure what you
want changed. Have you tested with 2.3b1? Does this meet
your needs?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=651701&group_id=5470