[Python-Dev] Missing PY_ prefixes in structmember.h

Guido van Rossum gvanrossum at gmail.com
Mon Oct 3 13:20:18 EDT 2016


Sounds like an oversight in a backwater of a header file. We should add the
PY symbols and deprecate the others.

--Guido (mobile)

On Oct 3, 2016 10:17 AM, "Skip Montanaro" <skip.montanaro at gmail.com> wrote:

> Thanks, Victor, but that's not quite what I was asking. Replacing "RO"
> with "READONLY" is clearly no big deal. My question was more wondering
> why I didn't find myself replacing PY_RO with PY_READONLY". Both names
> were part of the Public API in the early 90s, I suspect, and one of
> that set of flags does have a "PY_" prefix. Why didn't these flags
> (and the T_* flags in structmember.h) get swept up in all the hubbub
> around the grand renaming.
>
> Skip
>
>
> On Mon, Oct 3, 2016 at 10:39 AM, Victor Stinner
> <victor.stinner at gmail.com> wrote:
> > 2016-10-03 15:37 GMT+02:00 Skip Montanaro <skip.montanaro at gmail.com>:
> >> While starting to port the Python Sybase module to Python 3, among other
> >> hurdles, I noticed that RO is no longer defined. Looking in
> structmember.h,
> >
> > RO was an alias to READONLY. READONLY still exists in Python 3, just
> > use this name.
> >
> > You might create an alias in your code if it is missing:
> >
> > #ifndef RO
> > #  define RO READONLY
> > #endif
> >
> > Victor
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/
> guido%40python.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20161003/6c58a85d/attachment.html>


More information about the Python-Dev mailing list