Editing Russ Python Tips and Techniques
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
= What = | = What = | ||
These are Tips and Techniques I have found useful in my Python programming [[User:Russ_hensel]]. I would be interested in your feedback. Let me know if you think the tip is useful/wrong/something everyone knows. A good set of this material relates to applications with a GUI. They are often not beginner techniques, but neither are they all advanced ones. | These are Tips and Techniques I have found useful in my Python programming [[User:Russ_hensel]]. I would be interested in your feedback. Let me know if you think the tip is useful/wrong/something everyone knows. A good set of this material relates to applications with a GUI. They are often not beginner techniques, but neither are they all advanced ones. | ||
− | Just starting Feb 2017 check history | + | Just starting Feb 2017 check history to see if progress is being made. If you find a tip not finished or working feel free to contact me. |
== Ones Still To Be Written == | == Ones Still To Be Written == | ||
Line 7: | Line 7: | ||
* when division by 0 is useful | * when division by 0 is useful | ||
* code is multiple files - scratch file | * code is multiple files - scratch file | ||
+ | * msg, print( msg ) | ||
* moving to 3.6 use fstrings | * moving to 3.6 use fstrings | ||
* example files with functions [[Python Example Code]] | * example files with functions [[Python Example Code]] | ||
Line 12: | Line 13: | ||
* dict based case statements | * dict based case statements | ||
* choose names for cut and paste | * choose names for cut and paste | ||
+ | * saving your place in editor | ||
+ | * spyder using comments for navigation | ||
* mark your code with unusual string * zzz in your code | * mark your code with unusual string * zzz in your code | ||
+ | * make your names searchable | ||
− | |||
− | + | [[Programming Tips]] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
= Parameters for Applications = | = Parameters for Applications = | ||
Line 163: | Line 82: | ||
= Names = | = Names = | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
= Comments = | = Comments = | ||
Line 206: | Line 102: | ||
= Copy and Paste = | = Copy and Paste = | ||
− | |||
− | |||
There are lots of arguments against copy and paste, but used carefully I think that it is extremely useful. But used carefully. | There are lots of arguments against copy and paste, but used carefully I think that it is extremely useful. But used carefully. | ||
Line 221: | Line 115: | ||
** I own the results, if it does not work properly I am to blame | ** I own the results, if it does not work properly I am to blame | ||
** I write code in a generic way to make it easy to copy and paste. | ** I write code in a generic way to make it easy to copy and paste. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
* Other peoples code: | * Other peoples code: |