Message285212
| Author |
michael.foord |
| Recipients |
Vlastimil.Zíma, davin, michael.foord, peter.otten, r.david.murray, serhiy.storchaka |
| Date |
2017年01月11日.10:52:06 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1484131926.31.0.502786003251.issue20804@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I think option 3 is the correct semantic behaviour for sentinels, and if there are already examples of this in the standard library then it *doesn't* violate expected behaviour of pickling and copying (sentinel and singleton objects can be permitted to retain this property through copying and pickling if it is a document facet of their behaviour and a natural result of their use cases).
Sentinels exist *purely* to have unique, *identifiable* objects. So retaining identity is their "expected behaviour" as identity is their defining feature.
So Serhiy, if you're happy that you've implemented this correctly - with tests and documentation updates (I see a separate doc patch) - go ahead and commit. |
|