(wL) Forums
Python Coding Tips - Printable Version

+- (wL) Forums (https://war-lords.net/forum)
+-- Forum: Resources (https://war-lords.net/forum/forum-31.html)
+--- Forum: Programming (https://war-lords.net/forum/forum-33.html)
+--- Thread: Python Coding Tips (/thread-1407.html)



Python Coding Tips - Zaptor - May 19 2011

  • If your getting odd errors check your syntax (often parentheses,colons) before asking people.
  • If it CAN be put in a function, do so!
  • If your planning on making a large program (5kb+) separate it into library's if its logical
  • Don't use tons of variable you don't need
  • Use comments to say what function's do and what they effect outside the function or return
  • Give your variables logical names, no one likes to have to read a story a high person wrote while coding
  • If what you want a function to do is simple, and something you can say in a sentence. Its not a bad idea to Google it if you have problem with it.
If i think of anything else ill post it.