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/2014-April/134211.html below:

[Python-Dev] PEP 469: Restoring the iterkeys/values/items() methods

[Python-Dev] PEP 469: Restoring the iterkeys/values/items() methodsMarkus Unterwaditzer markus at unterwaditzer.net
Sun Apr 20 14:06:29 CEST 2014
On Sat, Apr 19, 2014 at 02:25:53PM +1000, Steven D'Aprano wrote:
> In my experience, writing polyglot 2+3 code can be easily handled with a 
> few helper functions, which is not the case with unicode string 
> literals. (Non-polygot code of course can just use the methods 
> directly.) I don't see this is a problem to be solved, or even much of a 
> nuisance. Polyglot code is never going to be quite as straightforward or 
> idiomic as non-polyglot code, and that's a good thing, as it reminds the 
> reader that they are dealing with polyglot code.

The problem i currently see is that most polyglot-projects are reimplementing
the same helper functions (for dict access, literals wrapping etc), not
depending on six because the authors don't feel it's "worth the extra
dependency", as they never need the full functionality of six.

So how about including a subset of six' more popular functionality into the
standard libraries of Python 2 and 3? I think it would solve the problem i
described (i.e. remove boilerplate for polyglot code), while it would also
avoid compromising the builtins of Python 3 (and keep polyglot code "explicitly
ugly")

Also, that's why people demanded a Python 2.8... so that you don't have to
pollute Python 3 instead.

-- Markus
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