[Libre-soc-bugs] [Bug 1094] insndb instruction database visitor-walker is needed
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Sat Jun 3 19:20:23 BST 2023
https://bugs.libre-soc.org/show_bug.cgi?id=1094
--- Comment #26 from Dmitry Selyutin <ghostmansd at gmail.com> ---
Unlike to docs where this is fine for documenting the classes and routines I
have a strong vomit reflex for putting tests in the place the code lives,
especially when tests are mixed with the code. This just complicates the major
case where everything works and you just want to get how it works, and rarely
help when something doesn't work and you want to know why (because no test can
replace a debugging, even via prints). Also, I'd rather had this:
if __name__ == "__main__":
main()
I find it exceptionally confusing that stuff under "main" executes something
other than main function. And it's especially strange if the script called as
standalone executable does a totally different thing than the same script but
called via python. This doesn't make any sense to do one stuff via shebang and
another via calling almost the same stuff but directly.
Many other modules follow this principle too (all these test_XXX.py).
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list