-
Notifications
You must be signed in to change notification settings - Fork 0
Quirks
Some quirks of the coding style
I use this module to change my path because of the way source is laid out on my machines. It normally will have no effect on you. Feel free to empty the file if you do not like its contents
At the top of most files. In development running of most file will result in the whole app being run by means of main.py This means you do not have to navigate to main.py to run.
I find it more readable, may or may not blacken in future.
-- I need to explain....
Often used when not necessary because makes extension of string to multi-line string easy.
as in
msg = ( "some message" ) print( msg )
Why:
- can assist in debug
- helps keep lines short
- may be more readable
- if local is used multiple times actually speeds code ( does no slow down )
- typos are caught in locals but not instance var.
- often used: msg, widget, sql, db,
Why:
May be used to prevent name collisions: a_str not str for a variable
I normally use ix for the numerical index in a loop. If looping over a list of names, I might use "i_name in names" with enumerate both of them.
- !! marks code that "must" be revisited.
- ?? marks questions to think about when we have time