This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author JBernardo
Recipients JBernardo, alex, benjamin.peterson, georg.brandl, pitrou, rhettinger
Date 2011-12-28.22:33:51
SpamBayes Score 5.2145843e-11
Marked as misclassified No
Message-id <1325111632.22.0.67344477959.issue13667@psf.upfronthosting.co.za>
In-reply-to
Content
The problem with `not in` is because it must evaluate the result. It's not just another operator like "==" and "!=".

Looks like we're suffering from premature optimization and now it would break a lot of code to make it good.

For my application, I created a different method to generate the object (Not as good as I wanted, but there's no option right now):

`MyClass().has(1)` instead of `1 in MyClass()`

So, if no one comes up with a better idea, this issue should be closed.

Thanks
History
Date User Action Args
2011-12-28 22:33:52JBernardosetrecipients: + JBernardo, georg.brandl, rhettinger, pitrou, benjamin.peterson, alex
2011-12-28 22:33:52JBernardosetmessageid: <1325111632.22.0.67344477959.issue13667@psf.upfronthosting.co.za>
2011-12-28 22:33:51JBernardolinkissue13667 messages
2011-12-28 22:33:51JBernardocreate