homepage

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 ethan.furman
Recipients Jim.Jewett, Joshua.Chin, ethan.furman, pitrou, r.david.murray, rhettinger
Date 2014年11月03日.20:21:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1415046106.85.0.444028052201.issue22766@psf.upfronthosting.co.za>
In-reply-to
Content
Okay, the python-dev ruling is in, and raising an exception in the __ixxx__ methods is allowed, and even a good idea in the cases of mutable containers.
However, doing the check on 'other' and raising a TypeError with an appropriate message would still be better for a couple reasons:
 - all the non-inplace operations raise TypeError when 'other' is not a correct type
 - __iand__ is currently buggy because it does not do the check
If backwards compatibility is a concern in this case, a custom "TypeError" that was a subclass of both TypeError and AttributeError could address that.
History
Date User Action Args
2014年11月03日 20:21:46ethan.furmansetrecipients: + ethan.furman, rhettinger, pitrou, r.david.murray, Jim.Jewett, Joshua.Chin
2014年11月03日 20:21:46ethan.furmansetmessageid: <1415046106.85.0.444028052201.issue22766@psf.upfronthosting.co.za>
2014年11月03日 20:21:46ethan.furmanlinkissue22766 messages
2014年11月03日 20:21:46ethan.furmancreate

AltStyle によって変換されたページ (->オリジナル) /