Python Forum
Script optimisation and style help
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script optimisation and style help
#2
I just have style comments. First, your comments before the functions should be done as triple quoted strings right after the def line. That way they become __docstring__ attributes of the function. That is what is displayed when you do help(function) in the interpreter. Second, learn string formatting, either the format method of strings, or the even newer f-string syntax (Python 3.6+).
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
RE: Script optimisation and style help - by ichabod801 - Feb-18-2019, 04:08 PM
RE: Script optimisation and style help - by buran - Feb-18-2019, 04:28 PM
RE: Script optimisation and style help - by buran - Feb-18-2019, 05:52 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020