[Python-3000] Lazy strings (was Re: Py3k release schedule worries)
Larry Hastings
larry at hastings.org
Fri Jan 12 22:12:52 CET 2007
Guido van Rossum wrote:
> Changing the API is the only reasonable solution amongst all the
> options I've seen.
I defer to you. Perhaps another approach will surface; in the meantime
I'll start on the API change.
You suggested changing the name as a reminder of the semantics change.
Are you interested in a structural change too? My personal aesthetic
for APIs is to return success/failure separately from output
parameters. So I propose something this:
#define PyUnicode_VALUE(self, p, len)
which would return nonzero on success and zero on failure. If it fails,
p and len would be unchanged.
Let me know what you'd like and I'll make it happen.
Cheers,
/larry/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20070112/4f0c540c/attachment.html
More information about the Python-3000
mailing list