Author veky
Recipients josh.r, mark.dickinson, rhettinger, serhiy.storchaka, veky
Date 2016-08-23.13:20:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1471958449.38.0.561244273928.issue27832@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-08-23 13:20:49vekysetrecipients: + veky, rhettinger, mark.dickinson, serhiy.storchaka, josh.r
2016-08-23 13:20:49vekysetmessageid: <1471958449.38.0.561244273928.issue27832@psf.upfronthosting.co.za>
2016-08-23 13:20:49vekylinkissue27832 messages
2016-08-23 13:20:48vekycreate