On Sat, Feb 06, 2021 at 10:00:16PM -0300, Luciano Ramalho wrote:
> On Sat, Feb 6, 2021 at 6:23 PM Chris Angelico <ros...@gmail.com> wrote:
> > How will a __future__ import help here? Are there syntactic or
> > behavioural changes that would be worth applying to some modules and
> > not others? The entire point of a __future__ import is to maintain
> > backward compatibility by, for instance, not introducing a keyword,
> > unless it is explicitly requested. What advantage would there be here?
> 
> The fact that a __future__ import only affects a single module is
> precisely the point: we may not want the feature in our code
> initially, but maybe we don't mind using third-party libraries that
> use it.

It's not compulsory to use syntactic features if your code doesn't need 
them. I have many scripts and modules that don't use while loops, or 
try...except blocks, or with statements.

A feature doesn't need to be a `__future__` import for you to just not 
use it.


> A __future__ import would make clear to all that the feature is
> experimental,

It certainly would not. There is nothing experimental about `__future__` 
imports. I cannot think of a single example of an experimental feature 
added via the future mechanism:

https://docs.python.org/3/library/__future__.html


-- 
Steve
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/QSCVO26VXM32CK3VOL572UKYWQVU4UE5/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to