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/2016-December/147024.html below:

[Python-Dev] Deprecate `from __future__ import unicode_literals`?

[Python-Dev] Deprecate `from __future__ import unicode_literals`? [Python-Dev] Deprecate `from __future__ import unicode_literals`?Serhiy Storchaka storchaka at gmail.com
Sat Dec 17 06:58:00 EST 2016
On 17.12.16 13:44, Christian Heimes wrote:
> On 2016-12-17 10:06, Serhiy Storchaka wrote:
>> On 16.12.16 21:24, Guido van Rossum wrote:
>>> e.g. the argument to getattr() -- I still hear of code that breaks due
>>> to this occasionally)
>>
>> What is the problem with unicode in getattr()? Unicode attribute name is
>> converted to str, and since the result is cached, this even don't add
>> much overhead.
>
> It breaks the str optimization of dicts. Dict with str-only keys are
> special-cased in Python 2.

getattr() converts a unicode to str and passes a str to PyObject_GetAttr().

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