• Jeremy Hylton's avatar
    Subclasses of string can no longer be interned. The semantics of · 4c989ddc
    Jeremy Hylton yazdı
    interning were not clear here -- a subclass could be mutable, for
    example -- and had bugs.  Explicitly interning a subclass of string
    via intern() will raise a TypeError.  Internal operations that attempt
    to intern a string subclass will have no effect.
    
    Added a few tests to test_builtin that includes the old buggy code and
    verifies that calls like PyObject_SetAttr() don't fail.  Perhaps these
    tests should have gone in test_string.
    4c989ddc
bltinmodule.c 57.7 KB