Re: getargs enhancement

Guido.van.Rossum@cwi.nl
Tue, 08 Mar 1994 18:14:31 +0100

Brilliant!

I was about to propose a whole list of new format letters, like L for
list, T for tuple, D for dictionary, F for file, etc. (analogous to S
for string which already exists), but obviously your scheme is much
more flexible.

If it is not too late, I would propose a different syntax, e.g. 'O!'.
This would be somewhat analogous to 's#', and conforming to the
convention that lower case letters represent C types and upper case
letters represent Python objects.

Next challenge: come up with a syntax that lets me specify that an
argument must be e.g. a list of (int, string) tuples or a dictionary
whose keys are strings and whose values are lists of (int, string)
tuples. Or am I asking too much?

--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
URL: <http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>