Message171167
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. |
|
Date |
User |
Action |
Args |
2012-09-24 18:18:19 | nparikh | set | recipients:
+ nparikh, mark.dickinson, christian.heimes, ezio.melotti, docs@python |
2012-09-24 18:18:19 | nparikh | set | messageid: <1348510699.55.0.00341422831466.issue16011@psf.upfronthosting.co.za> |
2012-09-24 18:18:19 | nparikh | link | issue16011 messages |
2012-09-24 18:18:18 | nparikh | create | |
|