Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jwilk/python-syntax-errors
no-op statements syntactically valid only since Python X.Y
https://github.com/jwilk/python-syntax-errors
Last synced: 2 days ago
JSON representation
no-op statements syntactically valid only since Python X.Y
- Host: GitHub
- URL: https://github.com/jwilk/python-syntax-errors
- Owner: jwilk
- Created: 2017-04-08T19:03:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-29T04:54:59.000Z (7 months ago)
- Last Synced: 2024-12-16T10:19:55.398Z (9 days ago)
- Language: Python
- Size: 41 KB
- Stars: 350
- Watchers: 4
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
This is a collection of no-op statements that are syntactically valid
only since Python *X*.\ *Y*, for most *X*.\ *Y* ≥ 2.2.For example:
.. code:: python
0_0 # Python >= 3.6 is required
The idea is to put such a statement near the top of your file.
If a user inadvertently ran the code against an older version,
they would get a fairly helpful error message:.. code:: console
$ python3.5 since-3.6.py
File "since-3.6.py", line 1
0_0 # Python >= 3.6 is required
^
SyntaxError: invalid syntax.. vim:ft=rst ts=3 sts=3 sw=3 et