using ":name" in ParseTuple()
If anyone out there is looking for some straight-forward changes to help
with Python development, then here is a chance...
I'll get around to submitting patches for this, but it would be much
later. So, if somebody can beat me to it...
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
---------- Forwarded message ----------
Date: Thu, 24 Feb 2000 16:42:12 -0500
From: Guido van Rossum
On a separate track, how about using the ":Name" form in the ParseTuple calls? It improves the error response a bit more...
Is that something you'd want to see in all the ParseTuple calls?
Ah, darn. I tried ";message" but it's inferior; I'd forgotten about ":name". Yes, that should be standard... Patches, please? --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-checkins mailing list Python-checkins@python.org http://www.python.org/mailman/listinfo/python-checkins
Greg> If anyone out there is looking for some straight-forward changes Greg> to help with Python development, then here is a chance... Greg, Can you give some brief instructions for those of us who haven't doing other things in school when we should been paying attention? Is it just adding ":public_name" to any and all format strings we can find? I'm going to have a little evening time free off-net while I'm out of town for the next week. I will freshen up my CVS copy and try doing a bunch. Skip
Skip> Can you give some brief instructions for those of us who haven't Skip> doing other things in school when we should been paying attention? Yiee! You know what I was doing! Should have been: Can you give some brief instructions for those of us who were doing other things in school when we should have been paying attention? i-gotta-clean-my-glasses-ly y'rs, S
On Thu, 24 Feb 2000, Skip Montanaro wrote:
... Is it just adding ":public_name" to any and all format strings we can find? I'm going to have a little evening time free off-net while I'm out of town for the next week. I will freshen up my CVS copy and try doing a bunch.
Yup. That's all there is. For example, consider line 1013 in stringobject.c (string_lower function): today: if (!PyArg_ParseTuple(args, "")) change to: if (!PyArg_ParseTuple(args, ":lower")) The :name part should be the user-visible name of the function or method. It does get tricky with something like the string_rfind_internal function -- the ParseTuple call is used for several functions. Cheers, -g -- Greg Stein, http://www.lyra.org/
participants (2)
-
Greg Stein
-
Skip Montanaro