PEP suggestion: Uniform way to indicate Python language version

Random832 random832 at fastmail.com
Mon Aug 22 08:52:55 EDT 2016


On Mon, Aug 22, 2016, at 08:44, Chris Angelico wrote:
> However, I don't think it's particularly necessary. Explicit version
> number checks should be very rare, and shouldn't be encouraged.
> Instead, encourage feature checks, as Steve gave some examples of.

The problem is when you want to write a large body of code that just
*uses* lots of features (including syntactic features), *without*
checking for them. Steve's examples were of how to support earlier
versions, not how *not* to. At some point you want to just write Python
3 code and say to hell with Python 2, or the same for any particular
version of Python 3.



More information about the Python-list mailing list