[Python-ideas] Python Users Aren't Perfect

Stephen J. Turnbull stephen at xemacs.org
Fri Dec 16 04:08:55 CET 2011

Ned Batchelder writes:
 > On 12/15/2011 4:06 PM, Masklinn wrote:
 > > On 2011-12-15, at 22:00 , Ned Batchelder wrote:
 > >> What?  The whole point of the "def foo(*args)" syntax is so a function can take an unknown-length list of arguments, which will be treated uniformly.
 > > That's not *entirely* true, it's also used for proxy functions, in order to just pass a bunch of arguments (positional or keywords) along to the next level without having to unpack and repack them one by one.
 > We are in agreement: I don't know the length, and I will treat them 
 > uniformly (pass them all through to the next function).

That's way too high a level of abstraction.

The discussion I found persuasive is the varargs analogy.

/* "Hello Ned" in C */
#include <stdio.h>
char *s = "string";
int i = 1;
double x = 3.1415926;

int main (int argc, char *argv[]) {
  printf ("string %s, int %d, double %f\nHello Ned!  Are we homogenized yet?");

Of course it still demands "correct perception" on the part of the
user, but I don't see this as "inconsistent".

More information about the Python-ideas mailing list