homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Olivier.Gagnon
Recipients Olivier.Gagnon, eric.snow, madison.may, rhettinger, serhiy.storchaka, vajrasky
Date 2013年07月12日.12:29:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1373632168.22.0.554052834365.issue18352@psf.upfronthosting.co.za>
In-reply-to
Content
I can understand that the current behaviour can be correct in regard with the added attributes of the object. However, should I open a new issue for the following inheritance behaviour which the reduce function affects also.
class myCounter(Counter):
 def __init__(self, bar, *args):
 self.foo = bar
 super().__init__(*args)
class myDict(dict):
 def __init__(self, bar, *args):
 self.foo = bar
 super().__init__(*args)
c = myCounter("bar")
l = myDict("bar")
print(c.foo) # prints bar
print(l.foo) # prints bar
cc = copy.copy(c)
ll = copy.copy(l)
print(cc.foo) # prints {}
print(ll.foo) # prints bar
History
Date User Action Args
2013年07月12日 12:29:28Olivier.Gagnonsetrecipients: + Olivier.Gagnon, rhettinger, eric.snow, serhiy.storchaka, madison.may, vajrasky
2013年07月12日 12:29:28Olivier.Gagnonsetmessageid: <1373632168.22.0.554052834365.issue18352@psf.upfronthosting.co.za>
2013年07月12日 12:29:28Olivier.Gagnonlinkissue18352 messages
2013年07月12日 12:29:28Olivier.Gagnoncreate

AltStyle によって変換されたページ (->オリジナル) /