[Python-Dev] PyUnicodeObject / PyASCIIObject questions

Terry Reedy tjreedy at udel.edu
Wed Dec 14 05:51:00 CET 2011


On 12/13/2011 7:01 PM, "Martin v. Löwis" wrote:

>> What I'm asking is that
>> (1)  The other values be documented as reserved, rather than as illegal.
> How is that different?
>> (2)  The macros produce an error rather than silently corrupting data.
> In debug mode, or release mode? -1 on release mode.

These two requests seem slight contradictory. Non-official __xxx__ names 
are reserved for future use but not illegal now for user-use, and 
user-generated examples do not raise an exception. They simply do not 
get any special attention unless and until given an official meaning. 
Then too bad if that breaks code.

So by analogy, reserved type value would be ignored, neither corrupting 
data or raising errors, until put in use. But I don't know how 
easy/practical that would be.

Or maybe more to the point, how expensive a check would be. Not checking 
names for reservedness is the easiest thing to do.

-- 
Terry Jan Reedy




More information about the Python-Dev mailing list