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/2009-November/093708.html below:

[Python-Dev] nonlocal keyword in 2.x?

[Python-Dev] nonlocal keyword in 2.x? [Python-Dev] nonlocal keyword in 2.x?Lennart Regebro regebro at gmail.com
Wed Nov 4 08:06:50 CET 2009
I should maybe point out that although I'm generally +1 on
backporting, I'm not specifically anything on backporting the nonlocal
keyword. There are probably things that would help more from a
compatibility standpoint than that.

For example, from __future__ import unicode_literals doesn't switch
the types. So this code will rais an assertion error in 2.6.

>>> from __future__ import unicode_literals
>>> assert isinstance("fghjkl", str)

While it of course will run fine in 3.0. Now this has a fairly trivial
workaround or two, but still.

I also would really like to see a real port of the bytes class to 2.6,
but I have a vague memory that there was some reason that wouldn't
work.

-- 
Lennart Regebro: Python, Zope, Plone, Grok
http://regebro.wordpress.com/
+33 661 58 14 64
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