Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

Ian Kelly ian.g.kelly at gmail.com
Sat Apr 5 01:07:43 EDT 2014


On Fri, Apr 4, 2014 at 10:40 PM, Chris Angelico <rosuav at gmail.com> wrote:
> On Sat, Apr 5, 2014 at 3:10 PM, Mark H Harris <harrismh777 at gmail.com> wrote:
>> we don't want folks to be driven away from Cpython as a language, and we
>> don't want them to fork the Cpython interpreter, so we'll take a very casual
>> and methodically conservative approach to nudging people towards a Cpython3
>> migration route
>
> If it's too much work to make the changes to move something from
> Python 2.7 to Python 3.3, it's *definitely* too much work to rewrite
> it in a different language. There would have to be some strong other
> reason for shifting, especially since there's a 2to3 but not a
> PytoRuby.

For whatever the current project is, yes -- if there's no route to
Python 3 then they will simply be stuck on Python 2.7 indefinitely.
However, if Python is perceived as a language that doesn't provide
backward compatibility and long-term maintainability via some
migration path, then users will be less likely to pick Python for
their *next* project.



More information about the Python-list mailing list