[Python-ideas] PEP 355 (overloading boolean operations) and chained comparisons
Raymond Hettinger
raymond.hettinger at gmail.com
Thu Oct 13 06:43:18 CEST 2011
On Oct 12, 2011, at 5:39 PM, Nick Coghlan wrote:
> PEP 355 would allow NumPy to fix that by overriding the logical 'and'
> operation that is implicit in chained comparisons to force evaluation
> of the RHS and return the rich result.
Have you considered that what-is-good-for-numpy isn't necessarily good for Python as a whole?
Extended slicing and ellipsis tricks weren't so bad because they were easily ignored by general users. In contrast, rich comparisons have burdened everyone (we've paid a price in many ways).
The numeric world really needs more operators than Python provides (a matrix multiplication operator for example), but I don't think Python is better-off by letting those needs leak back into the core language one-at-a-time.
Raymond
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20111012/33e41ca7/attachment.html>
More information about the Python-ideas
mailing list