On 3/7/2011 5:54 AM, Victor Stinner wrote: >> I don’t really understand this message (especially “cached into the >> object”) :) Maybe in the Misc/NEWS entry you could also add a line to >> explain to users the reason/goal/benefit of this change? > > If you call str.encode() twice: the first call stores the result in a > cache, and the second call just reuse the cache. The benefit is that the > second call is much faster. > > The cache is an internal attribute of the Unicode object (str type). > > Do you have a suggestion to rephrase the Misc/NEWS entry? (Without reading the entire entry,) something like: 'More consistently cached as an internal attribute of the str object for possible later reuse.' -- Terry Jan Reedy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4