Talin writes: > 2) I noticed in your PEP that you followed the same mental model as is currently > used in the compiler, which is that *args and **args are treated as special > cases. In other words, the description of a function's arguments consists of an > array of "regular" arguments, plus a couple of "special" argument fields. > > My mental model is a little different, as I tend to see the argument as a single > list, where arguments have different modifiers, where * and ** are modifiers. In > other word, my model follows more closely (IMHO) the way that arguments are read > by the programmer.
Brett responds: > Yeah, I see what you are saying. But I actually held this view long > before Iearned how Python did things underneath the covers. > > I have no clue how people tend to view things. Anyone else care to > comment on how they tend to see arguments? My mental model matches Brett's. I think of the argument signature as defining what arguments are permitted/required by the caller -- more a static process than a dynamic one. So instead of imagining *args as meaning "now bind all the rest of the positional arguments" I think of it more as "and then you're allowed as many positional arguments as you like". -- Michael Chermside _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com