Message287269
| Author |
Eric Lafontaine |
| Recipients |
Eric Lafontaine, christian.heimes, docs@python, ezio.melotti, mark.dickinson, nparikh, r.david.murray, vstinner |
| Date |
2017年02月08日.01:34:45 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1486517685.55.0.986678037681.issue16011@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
oh, I've got what you meant!
Proposed change :
For user-defined classes which define the __contains__() method, the in operator will convert to False "x in y" if y.__contains__(x) return False, 0 or None. Otherwise, the in operator will return True for any other value being returned by y.__contains__(x).
Would that make more sense?
Regards,
Eric Lafontaine |
|