[Python-Dev] Built-in functions, kw args

Jp Calderone exarkun@meson.dyndns.org
Sat, 21 Sep 2002 01:50:11 -0400


--Q68bSM7Ycu6FN28Q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

>>> ''.split(maxsplit=10)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: split() takes no keyword arguments

/usr/src/Python-2.2.1/Objects$ egrep "PyArg_ParseTuple[^A]" *.c | wc -l
     73
/usr/src/Python-2.2.1/Objects$ egrep PyArg_ParseTupleAndKeywords *.c | wc -l
     16

  It looks like the usage of ParseTuple vs ParseTupleAndKeywords is just
whatever the author felt like using at the time (to me, anyway).  For the
sake of consistency at least (and convenience to boot), might it be nice to
use PyArg_ParseTupleAndKeywords in more places -- I hesitate to say
everywhere, but at least in the places it makes sense?  Is there a reason
not to do this?  Would a patch be accepted that made it so?

  Jp

--
 1:00am up 123 days, 1:54, 3 users, load average: 0.47, 0.54, 0.53

--Q68bSM7Ycu6FN28Q
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9jAiSedcO2BJA+4YRAgiVAKDNB567/2y7GKZwyCHHv3Ew76ltnwCaAnsM
7GDjNNU3ucBGFwA8Rgtqx7A=
=WdYD
-----END PGP SIGNATURE-----

--Q68bSM7Ycu6FN28Q--