Vedran Čačić added the comment:

Argh. This is not the first time my proposal was blown way out of proportion, 
and then killed. :-(

What exactly is wrong with making _normalized keyword-only? All the serious 
usage (including all the usage already in fractions.py) remain the same, and we 
avoid an obvious "error passes silently" issue.

I know Serhiy's proposal is scary, it scares me too. super call inside a 
non-method is something only wizards use, probably. :-) But that doesn't mean 
we should give up on a trivial enhancement that correctly counts the given 
arguments.

Would you really be fine with, e.g. a builtin chr function, that is documented 
exactly as it is now documented, but in fact can be called with two arguments, 
and if the second argument is false, it works exactly the same, but if it is 
true, it returns an object that looks like a string of length one, but in fact 
is surrogate-represented (of length two) if the first argument is greater than 
65535? I'm sure it would be pronounced a bug almost immediately. And I don't 
see how it's different from this.

Python callables _do_ count their arguments. Python is not JavaScript. Calling 
a function with a different number of arguments than it receives _is_ an error. 
Errors shouldn't pass silently. _Especially_ if they happen rarely.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27832>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to