Antoon Pardon <[email protected]>:
> The point is that all too often someone wants to defend a specific
> choice the developers have made and cites some general rule or
> principle in support, ignoring the fact that python breaks that
> rule/principle in other area's.
Granted, but you have set the trap for them by demanding a justification
when no justification was required. Every language has their cute
idiosyncrasies and arbitrary design choices.
Still, I have seen some glitches in the matrix as well:
>>> setattr(3, "__str__", lambda: "hello")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'int' object attribute '__str__' is read-only
>>> setattr(3, "hello", lambda: "hello")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'int' object has no attribute 'hello'
Bottom line, though, is that these corner cases in no way prevent you
from accomplishing your programming objective using Python.
Marko
--
https://mail.python.org/mailman/listinfo/python-list