Matthew Barnett <pyt...@mrabarnett.plus.com> added the comment: The normal use of a keyword argument is to refer to a formal argument, which is an identifier. Being able to wrap it up into a dict is a later addition, and it's necessary to turn the identifier into a string because it's not possible to use a bare word (as Perl would call it) as a key (I can't think of any other place where something is automatically turned into a string). Of course, another approach would've been to make them attributes of the formal argument:
def foo(**args): print "a is %s" % args.a foo(a=1) As for it being an exception to the rule, well, many things can be a key: an integer could be a key. Would foo(0="zero") be OK? There's no syntactic reason why it couldn't be allowed. -1 from me. _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5382> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com