[Python-Dev] zap _Py prefix?

Skip Montanaro skip@pobox.com
Mon, 3 Jun 2002 13:41:22 -0500

The issue of Michael's static PyTimeout_Err symbol reminded me about a
question I had about _Py-prefixed symbols.  I realize they are all
"internal", but I also recall Tim saying a couple of times that the ANSI C
standard reserves all symbols which begin with underscores for use by
compiler writers.

Should the _Py-prefixed symbols be renamed, for example, from




?  If so, we would then declare that all external symbols which begin with
"Py__" were part of the private API.  We would of course add macro
definitions during the deprecation period:

    #define _PyUnicode_IsDecimalDigit Py__Unicode_IsDecimalDigit

(It would also be nice to #warn when the macros are used.  Is that possible
with the C preprocessor?)