<story><title>No-op statements syntactically valid only since Python X.Y</title><url>https://github.com/jwilk/python-syntax-errors</url></story><parent_chain></parent_chain><comment><author>usr1106</author><text>I learned Python probably over 15 years ago. Haven&amp;#x27;t used it very much and certainly not followed all the news.&lt;p&gt;I remember back then it was said the design philosphy was something like there should be one obvious way to code something correctly. In opposite to Perl where the philosohpy was that human thoughts can take weird ways and you should be able to put your thoughts to code directly. (Both characterizations from memory.)&lt;p&gt;Today I hear little from Perl. And with new syntax added to Python in every version I start to wonder how far away Python is drifting away from that original characterization above.</text></comment>
<story><title>No-op statements syntactically valid only since Python X.Y</title><url>https://github.com/jwilk/python-syntax-errors</url></story><parent_chain></parent_chain><comment><author>dvt</author><text>If you &lt;i&gt;really&lt;/i&gt; need to do this, it should be done like so in some sort of bootstrap file that won&amp;#x27;t run into parsing&amp;#x2F;lexing errors:&lt;p&gt;&lt;pre&gt;&lt;code&gt;    import sys
    sys.version_info
    
    if not sys.version_info[:2] == (3, 1):
       raise Exception(&amp;quot;You need Python &amp;gt;= 3.1&amp;quot;)
    else:
       from your_module import whatever
&lt;/code&gt;&lt;/pre&gt;
I really hope no one&amp;#x27;s seriously using this repo to get any ideas.</text></comment>