2010/8/24 Hrvoje Niksic <hrvoje.nik...@avl.com>:
> The __length_hint__ lookup expects either no exception or AttributeError,
> and will propagate others.  I'm not sure if this is a bug.  On the one hand,
> throwing anything except AttributeError from __getattr__ is bad style (which
> is why we fixed the bug by deriving our business exception from
> AttributeError), but the __length_hint__ check is supposed to be an internal
> optimization completely invisible to the caller of list().

__length_hint__ is internal and undocumented, so it can do whatever it wants.



-- 
Regards,
Benjamin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to