On Nov 22, 2007 2:30 AM, Christian Heimes <[EMAIL PROTECTED]> wrote: > Amaury Forgeot d'Arc wrote: > > Could this code replace the current PyString_AsStringAndSize, instead > > of creating a new function? > > I guess it could. But it's a naming question. The method is more general > and takes more than just instances of PyString and its subclasses. > Therefor I think it should be part of the abstract protocol. Guido? :)
(Did I reply to this before? Can't remember. Getting old. :-) Personally I think we should get rid of all this attempts at micro-optimizations (most of which don't buy enough time to matter but bloat the code), and just use the buffer API exclusively. The buffer API can't replace PyString_AsStringAndSize since it requires a cleanup call when you're done. Ideally that API disappears completely -- in practice there are too many occurrences and the refactoring is a bit complex to do automatically. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
