[Python-Dev] strncpy

Paul Prescod paul@prescod.net
Thu, 13 Jul 2000 02:53:07 -0500


Greg Stein wrote:
> 
> Actually, I looked into this a few months ago.
>...

Oh yeah? Where is the Python Enhancment Proposal?

If we don't care about floating point, I think that there are about a
dozen snprintf's we could steal (legally) around the Web. The author of
the one I found says:

> In retrospect, it appears that a lot of effort was wasted by 
> many people for not being aware of what others are doing. Sigh. 

Greg proposes:
> %.###s  -- switch to %s

Isn't %.###s useful? If some yahoo gives us a 200 character variable
name, is it really useful to quote it all back?

For NameErrors and UnboundLocalErrors in ceval, I'm just going to use
PyString_Format. If that's not solid, we're in big trouble. Okay, it
isn't so fast but we're talking about relatively rare exceptions -- not
IndexError or AttributeError.
-- 
 Paul Prescod - Not encumbered by corporate consensus
Simplicity does not precede complexity, but follows it. 
	- http://www.cs.yale.edu/~perlis-alan/quotes.html