]> granicus.if.org Git - python/commit
Issue #8923: cache str.encode() result
authorVictor Stinner <victor.stinner@haypocalc.com>
Wed, 2 Mar 2011 01:03:14 +0000 (01:03 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Wed, 2 Mar 2011 01:03:14 +0000 (01:03 +0000)
commita5c68c3cb7bc5068833742dc10a3cd5a19e69e12
treea35feeaad912317ffb10c797c95b4e08bbd1b647
parentf3fd733f928752c9e35f8f5141a54cd21c0993b5
Issue #8923: cache str.encode() result

When a string is encoded to UTF-8 in strict mode, the result is cached into the
object. Examples: str.encode(), str.encode('utf-8'), PyUnicode_AsUTF8String()
and PyUnicode_AsEncodedString(unicode, "utf-8", NULL).
Misc/NEWS
Objects/unicodeobject.c