Message265631
Hmm. The contract is actually that replace returns a *new* instance with the specified values changed. So I think it would be adequate in this case to simply call the subclass constructor with the values that replace manages, and not worry about anything else. There is actually no (current) contract to preserve any other values of the existing instance.
A subclass that wants to add other values that can be replaced will have to override replace, which should not be unexpected. |
|
Date |
User |
Action |
Args |
2016-05-15 16:43:22 | r.david.murray | set | recipients:
+ r.david.murray, belopolsky, eltoder, serhiy.storchaka, yselivanov, Andrew.Lutomirski, eddygeek |
2016-05-15 16:43:22 | r.david.murray | set | messageid: <1463330602.65.0.823860282258.issue20371@psf.upfronthosting.co.za> |
2016-05-15 16:43:22 | r.david.murray | link | issue20371 messages |
2016-05-15 16:43:22 | r.david.murray | create | |
|