> [...] I guess it will be also good to have the special methods for > the logical operations 'and', 'or' and 'not', (something like > __land__, __lor__ and __lnot__ to distinguish them from the bitwise > versions __and__ and __or__). > > So, if you overload the proper logical methods, you can write > something like > > cond = not (sin(x) > 0.5 ) and ( b <= 0.5 ) > > where 'not' and 'and', like '>' and '<=', wil return anything you want. Sorry, that won't be possible any time soon. If I allowed these operators to be overloaded, they would lose their shortcut properties, which are the reason for their existence. --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4