<br><br><div class="gmail_quote">2013/3/4 Serhiy Storchaka <span dir="ltr"><<a href="mailto:storchaka@gmail.com" target="_blank">storchaka@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 01.03.13 17:24, Stefan Bucur wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Before digging deeper into the issue, I wanted to ask here if there are<br>
any implicit assumptions about string identity and interning throughout<br>
the interpreter implementation. For instance, are two single-char<br>
strings having the same content supposed to be identical objects?<br>
</blockquote>
<br></div>
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.</blockquote><div><br></div>
<div>Really?</div><br>>>> x = u'\xe9'.encode('ascii', 'ignore')<br>>>> x == '', x is ''<br>(True, False)</div><div class="gmail_quote"><br></div><div class="gmail_quote">
<br></div>-- <br>Amaury Forgeot d'Arc