Message150321
| 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 |
|