Message 333172 - Python tracker

Message333172

Author ronaldoussoren
Recipients elfring, ronaldoussoren, vstinner
Date 2019-01-07.16:06:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1546877207.23.0.904415831854.issue35671@roundup.psfhosted.org>
In-reply-to
Content
See: <https://stackoverflow.com/questions/228783/what-are-the-rules-about-using-an-underscore-in-a-c-identifier>

Basically all names starting with double underscores are reserved for the implementation in C++. Likewise for all names starting with an underscore when defining globals (such as function names).

IIRC C has similar rules for double underscores and for underscore followed by an uppercase letter, but I don't have a handy reference for those.

In general Python's use of these symbols should be safe enough, it is highly unlikely that a C/C++ implementation uses names starting with "_Py" even if those are reserved for the implementation.

@elfring: Do you run into actual problems due to Python's use of these identifiers?
History
Date User Action Args
2019-01-07 16:06:48ronaldoussorensetrecipients: + ronaldoussoren, vstinner, elfring
2019-01-07 16:06:47ronaldoussorensetmessageid: <1546877207.23.0.904415831854.issue35671@roundup.psfhosted.org>
2019-01-07 16:06:47ronaldoussorenlinkissue35671 messages
2019-01-07 16:06:47ronaldoussorencreate