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. > It has not yet been specified whether the keyword-only arguments must > each have a default. Most proposals assume not, but then do ugly > things to support that assumption. The above suggests > > def foo(a, b=2, *, x=3, y=4): # OK > def foo(a, b=2, *, x, y=4): # not yet decided Defaults and keywords have nothing to do with each other, other than the fact that they both use the '=' sign. So both examples above would be OK, however if you failed to supply a value for 'x', that would be an error in the second example, but not the first. -- Talin _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
