Author serhiy.storchaka
Recipients Delgan, nixphix, p-ganssle, serhiy.storchaka
Date 2018-12-04.16:04:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1543939468.57.0.788709270274.issue35364@psf.upfronthosting.co.za>
In-reply-to
Content
This is not easy problem, ant it doesn't have right solution. Different decisions were made for the result type of alternate constructors and operators for different classes.
 
The frombytes() method of an int subclass returns an int. As well arithmetic operations with int subclasses return an int.

The fromhex() method of a bytes subclass returns an instance of this subclass. But arithmetic operations with bytes subclasses return a bytes object.

The fromkeys() method of a dict subclass returns an instance of this subclass. The copy() method of a dict subclass returns a dict. The copy() method of a dict subclass returns a dict. But defaultdict, OrdertedDict and Counter redefine it: copy() methods of their subclasses return the object of the same type.
History
Date User Action Args
2018-12-04 16:04:28serhiy.storchakasetrecipients: + serhiy.storchaka, p-ganssle, Delgan, nixphix
2018-12-04 16:04:28serhiy.storchakasetmessageid: <1543939468.57.0.788709270274.issue35364@psf.upfronthosting.co.za>
2018-12-04 16:04:28serhiy.storchakalinkissue35364 messages
2018-12-04 16:04:28serhiy.storchakacreate