[merge] 'raise NotImplemented'
Lukáš Lalinský
lalinsky at gmail.com
Tue Sep 26 23:38:29 BST 2006
John Arbash Meinel wrote:
> In inventory.py there are a lot of places that are doing:
>
> if not foo:
> return NotImplemented
>
> I'm pretty sure all of these should be:
>
> if not foo:
> raise NotImplemented
>
No, __eq__ & co. should return NotImplemented [1]. It you use 'raise' then
usually with NotImplementedError.
-Lukáš
[1] http://docs.python.org/ref/customization.html#l2h-189
More information about the bazaar
mailing list