nonehack
A quick hack to add None coalescing syntax to Python
The usual caveats for playing with quick&dirty import hacks apply. In particular:
- You must have a main script that does an
import nonecoahack
and then imports your real main code as a module. (Seenonecoa.py
andnonecoatest.py
if this isn't clear.) - If you want to hack on the hack itself, you generally need
to
touch *.py
orrm -rf __pycache__
to make sure the changes take effect. - Tracebacks, etc. may be ugly.
- Do not use with any other import hooks, including non-hacky ones.