diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-30 00:38:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-30 00:38:25 +0300 |
commit | 8ac2d85d2fd3f8b997e9c9bddadada0dc7bdaf37 (patch) | |
tree | d53542fd29020a213c441b50ca514f8507b7f03d /doc/python_api/rst/info_best_practice.rst | |
parent | 3c767ceccea9c9719fcd885a9ef8b78792cdf2a4 (diff) |
Cleanup: trailing space
Diffstat (limited to 'doc/python_api/rst/info_best_practice.rst')
-rw-r--r-- | doc/python_api/rst/info_best_practice.rst | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/doc/python_api/rst/info_best_practice.rst b/doc/python_api/rst/info_best_practice.rst index 418f636030c..10e237f4c40 100644 --- a/doc/python_api/rst/info_best_practice.rst +++ b/doc/python_api/rst/info_best_practice.rst @@ -297,13 +297,13 @@ Here are 3 ways of joining multiple strings into one string for writing. This also applies to any area of your code that involves a lot of string joining. -``String addition`` - +``String addition`` - this is the slowest option, *don't use if you can help it, especially when writing data in a loop*. >>> file.write(str1 + " " + str2 + " " + str3 + "\n") -``String formatting`` - +``String formatting`` - use this when you are writing string data from floats and ints. >>> file.write("%s %s %s\n" % (str1, str2, str3)) @@ -392,4 +392,3 @@ While developing a script it is good to time it to be aware of any changes in pe # do something... print("My Script Finished: %.4f sec" % (time.time() - time_start)) - |