3 ms·
Suggestion: a short main() and if __name__ = ... for each file, serving as a demo/smoke test. It doesn't stop you from importing it as a module, and it's nice t
by a3n 10y ago
Suggestion: a short main() and if __name__ = ... for each file, serving as a demo/smoke test. It doesn't stop you from importing it as a module, and it's nice to see using code.
- felixhummel 10y agoAlong the same lines - use doctests maybe? if __name__ == "__main__": import doctest doctest.testmod() https://docs.python.org/3.5/library/doctest.html https://docs.python.org/3.5/library/doctest.html