[Python-3000] Pronouncement on parameter lists

Michael Spencer mahs at telcopartners.com
Sat Apr 22 04:45:17 CEST 2006


Talin wrote:
> Jim Jewett <jimjjewett <at> gmail.com> writes:
> 
>> It has not yet been specified what would happen to additional
>> positional arguments that get passed in anyway.  (Swallow or raise an
>> Exception?)
> 
> Additional positional arguments would be treated exactly as if you attempted 
> to pass too many positional arguments to a function that took a fixed number 
> of arguments. In other words, raise TypeError.
> 
Does calling with wrong arguments deserve a more specific Exception, e.g., 
ArgumentsError(TypeError)?  The main motivation would be greater clarity and 
precision in the exception itself, but it would also enable dirt-simple function 
overloading.

Michael





More information about the Python-3000 mailing list