A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-March/124549.html below:

[Python-Dev] Disabling string interning for null and single-char causes segfaults

[Python-Dev] Disabling string interning for null and single-char causes segfaults [Python-Dev] Disabling string interning for null and single-char causes segfaultsAmaury Forgeot d'Arc amauryfa at gmail.com
Mon Mar 4 20:06:31 CET 2013
2013/3/4 Serhiy Storchaka <storchaka at gmail.com>

> On 01.03.13 17:24, Stefan Bucur wrote:
>
>> Before digging deeper into the issue, I wanted to ask here if there are
>> any implicit assumptions about string identity and interning throughout
>> the interpreter implementation. For instance, are two single-char
>> strings having the same content supposed to be identical objects?
>>
>
> I think this is not a bug if the code relies on the fact that an empty
> string is a singleton. This obviously is an immutable object and there is
> no public method to create different empty string.


Really?

>>> x = u'\xe9'.encode('ascii', 'ignore')
>>> x == '', x is ''
(True, False)


-- 
Amaury Forgeot d'Arc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20130304/d703ebcc/attachment.html>
More information about the Python-Dev mailing list

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