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 r.david.murray
Recipients Andrew.Lutomirski, belopolsky, eddygeek, eltoder, r.david.murray, serhiy.storchaka
Date 2016年05月15日.21:02:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1463346130.81.0.832213152549.issue20371@psf.upfronthosting.co.za>
In-reply-to
Content
Ah, interesting. The python version (which is based on the original python code that served as the specification for the C version) has docstrings that explicitly say "new XXX". The C docstrings and rest docs do not reflect that subtlety.
The docstrings of the two modules and the rest docs should be harmonized. A single word can make a difference :)
Perhaps this should be brought up on python-dev again, as the issue here clearly applies to more than just datetime. This in many ways highlights the heart of the subclassing issue.
In the email package I called the method "clone", and all properties that can be changed are accessible as keyword arguments...and in fact that set of properties is explicitly the set of all class non-method attributes. Policy instance attributes are otherwise read-only. So I solved the problem by specifying the behavior of the clone method in the face of subclassing, making it an explicit API. That's more like your first option: specifying the API you need to follow in a subclass in order to support replace.
History
Date User Action Args
2016年05月15日 21:02:10r.david.murraysetrecipients: + r.david.murray, belopolsky, eltoder, serhiy.storchaka, Andrew.Lutomirski, eddygeek
2016年05月15日 21:02:10r.david.murraysetmessageid: <1463346130.81.0.832213152549.issue20371@psf.upfronthosting.co.za>
2016年05月15日 21:02:10r.david.murraylinkissue20371 messages
2016年05月15日 21:02:10r.david.murraycreate

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