[Python-Dev] Breaking undocumented API

M.-A. Lemburg mal at egenix.com
Tue Nov 16 20:16:50 CET 2010


Alexander Belopolsky wrote:
> On Tue, Nov 16, 2010 at 1:57 PM, M.-A. Lemburg <mal at egenix.com> wrote:
> ..
>>> Note that we can have both a macro and a function
>>> version. This is fairly standard practice in Python C-API.
>>>> Sure, but what for ?
>>>> Mostly just for consistency with the other macros:
>> http://docs.python.org/dev/py3k/c-api/unicode.html#unicode-character-properties
>> Wait, these actually map to C functions as well. So this is just a
> naming issue.

As said: the UCS2/4 name mangling doesn't count fall under the
macro naming scheme, since it's done transparently and with a
different reasoning in mind, than when you decide to use a macro
to access some object detail, or want to avoid repetition. This
trick was also added after the original APIs had already been documented
for a while, so there was no way to change their names anymore.
The various ctype functions use macro names for historic
reasons: they were directed to different functions and/or
inline code depending on a configuration switch. This is now
gone, since the lib C ctype functions were locale aware and
often implemented things a little differently than the Python
ctype tables.
-- 
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Nov 16 2010)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::

 eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
 Registered at Amtsgericht Duesseldorf: HRB 46611
 http://www.egenix.com/company/contact/


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /