8 ms·
Yes: import from __future__ https://docs.python.org/3/library/__future__.html https://docs.python.org/3/library/__future__.html
by cpeterso 5y ago
Yes: import from __future__
https://docs.python.org/3/library/__future__.html https://docs.python.org/3/library/__future__.html
- Wowfunhappy 5y agoI'd say that's a "kind of", since it implies the feature will eventually become mandatory. I was thinking more along the lines of Javascript's 'use strict';
- oblvious-earth 5y agoNo, there's a general aversion to "use flag" features among the Python core dev due to not wanting to support multiple versions of Python behavior and how they may interact over the long term. "from __future__" is meant to only ever be used temporarily with a specific Python version slated for it becoming the default behavior. This discussion about flags has come up recently as part of the debate of accepting PEP 649 or PEP 563 or something else continues. If the Steering Council does not accept PEP 563 it will need to be figured out how to deprecate "from __future__ import annotations" without making it the default and how to implement it's replacement.