Martin v. Löwis added the comment:

Terry: can you propose an alternative wording? I don't think that the 
discussion of TypeError belongs into the description of NotImplemented, though.

IIUC, NotImplemented was added for performance reasons; returning a value is 
much faster than raising an exception. The return only requires an 
INCREF/DECREF pair, and a pointer identity test. The exception requires to 
create a new object, possibly a traceback, and a subclass check on exception 
matching.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15997>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to