Message287269
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 |
|
Date |
User |
Action |
Args |
2017-02-08 01:34:45 | Eric Lafontaine | set | recipients:
+ Eric Lafontaine, mark.dickinson, vstinner, christian.heimes, ezio.melotti, r.david.murray, docs@python, nparikh |
2017-02-08 01:34:45 | Eric Lafontaine | set | messageid: <1486517685.55.0.986678037681.issue16011@psf.upfronthosting.co.za> |
2017-02-08 01:34:45 | Eric Lafontaine | link | issue16011 messages |
2017-02-08 01:34:45 | Eric Lafontaine | create | |
|