2010/8/23 Guido van Rossum <gu...@python.org>:
> The main problem I can see with letting exceptions other than
> AttributeError bubble through (besides perverted dependencies on the
> current semantics) is that there are some situations where it is
> pretty arbitrary whether TypeError or AttributeError is raised. I
> can't recall the details, and possibly this was more of a problem with
> classic classes, but I do think it warrants some research.

I believe this was with regards to actual operations, though, not
fetching the attribute. For example, float(a) would raise an
AttributeError for a classic instance and a TypeError for a new-style
instance. However both would raise AttributeError on a.__float__.



-- 
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