diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-30 00:39:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-30 00:39:59 +0300 |
commit | 6af997710bf8bf48381bebe73d01d8c521a014ac (patch) | |
tree | 84cc30df0a266f31858e40e20c8d178206626116 /doc/python_api/rst/info_best_practice.rst | |
parent | c754b2239c065a76386df211daf365da6ed56312 (diff) | |
parent | 8ac2d85d2fd3f8b997e9c9bddadada0dc7bdaf37 (diff) |
Merge branch 'master' into blender2.8
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 b9c9f234b72..8b64bacd50e 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)) - |