Message212633
| Author |
michael.foord |
| Recipients |
Vlastimil.Zíma, michael.foord, peter.otten, r.david.murray |
| Date |
2014年03月03日.12:28:26 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1393849706.83.0.797457627274.issue20804@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I'm not sure to what extent mock documentation should explain Python semantics. The docs *do* make clear that sentinel is useful for where you want to test (compare) objects by *identity*. Problems with copying and pickling them come from the fact that those operations don't preserve *identity*, which is a basic facet of *Python* and not down to mock/sentinel.
"sentinel provides a convenient way of creating and testing the identity of objects like this." |
|