]> granicus.if.org Git - python/commit
If interning an instance of a string subclass, intern a real string object
authorTim Peters <tim.peters@gmail.com>
Wed, 12 Sep 2001 07:54:51 +0000 (07:54 +0000)
committerTim Peters <tim.peters@gmail.com>
Wed, 12 Sep 2001 07:54:51 +0000 (07:54 +0000)
commit111f60964ee438e64d82cb884f9dfdec10321b7c
tree18d0b7bf790ec9fc702aa3e5e95290e2ae0c046f
parentaf90b3e610212a4994962246875e5bfc5574dff6
If interning an instance of a string subclass, intern a real string object
with the same value instead.  This ensures that a string (or string
subclass) object's ob_sinterned pointer is always a str (or NULL), and
that the dict of interned strings only has strs as keys.
Lib/test/test_descr.py
Objects/stringobject.c