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 nparikh
Recipients christian.heimes, docs@python, ezio.melotti, mark.dickinson, nparikh
Date 2012-09-24.18:18:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1348510699.55.0.00341422831466.issue16011@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for passing along the thread, it was interesting. Oddly, it seemed to die off with no real resolution.

I realize it is now too late to change __contains__ to return a non-boolean value, but for reference, the reason I wanted to return something different from __contains__ was also to implement a DSL, though not a SQL-related one. Basically, I have some kind of abstract mathematical set S, and I wanted "x in S" to return a constraint that the variable x must lie in the set S for use in a larger problem description. (In fact, one could implement __contains__ so it returned True/False with a constant numeric argument and a constraint object with a variable argument.) This would have mirrored the way one would write all this mathematically.
History
Date User Action Args
2012-09-24 18:18:19nparikhsetrecipients: + nparikh, mark.dickinson, christian.heimes, ezio.melotti, docs@python
2012-09-24 18:18:19nparikhsetmessageid: <1348510699.55.0.00341422831466.issue16011@psf.upfronthosting.co.za>
2012-09-24 18:18:19nparikhlinkissue16011 messages
2012-09-24 18:18:18nparikhcreate