Uniform Function Call Syntax (UFCS)

Ian Kelly ian.g.kelly at gmail.com
Mon Jun 9 10:24:35 EDT 2014


On Jun 8, 2014 9:56 PM, "Steven D'Aprano"
> > which means that hasattr (which is defined by
> > attempting to get the attribute and seeing if an exception is thrown)
> > has to return True.
>
> Yes. And this is a problem why?

Earlier in this thread I pointed out that returning True creates problems
for duck typing. But I'm now convinced that's preferable to making getattr
and hasattr inconsistent.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20140609/6f32b490/attachment.html>


More information about the Python-list mailing list