Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #63395

Re: the Gravity of Python 2

References <laf00q$10k$1@ger.gmane.org> <CAPTjJmqzc2AQJ6TrBtCFnT+NBp8uYWMxMhtGNpLr+NGyhoxO-g@mail.gmail.com> <CABicbJ+k9Yim879QaDtty_dNvpZMgKA8W-zX6Xcsc5BQcnaCaQ@mail.gmail.com> <CAPTjJmozt8XcWrW2xAX7oeHDQHcDDWkoY7kMK0YXdYU+z+cOfQ@mail.gmail.com> <CABicbJ+YMRLHqQQ3nFLeqqxnvqRLRioZc9X3pZUMfZWzgEbMSw@mail.gmail.com>
Date 2014-01-07 13:00 +1100
Subject Re: the Gravity of Python 2
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.5106.1389060068.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Jan 7, 2014 at 12:55 PM, Devin Jeanpierre
<jeanpierreda@gmail.com> wrote:
> What if we decide there is no single source of responsibility, and it
> can't be limited exactly to a module, and make a __future__ feature
> the best we can regardless? We can still exact some benefit from a
> "sloppy" __future__ feature: we can still move code piecemeal.

I worry that it's starting to get into the realm of magic, though.
Maybe dict.keys() isn't the best example (you can easily make your
code 2+3 compat by just calling list() on it immediately, which is
effectively "from __past__ import absence_of_views"), but the issue is
the same with string autoencodings. It's really hard to define that
the + operator will do magic differently based on a future directive,
and changing the object ("this string will not autoencode") means
you're not tweaking things per-module, and behaviour will change
and/or break based on where some object was created, rather than the
settings on the module with the code in it.

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: the Gravity of Python 2 Chris Angelico <rosuav@gmail.com> - 2014-01-07 13:00 +1100

csiph-web