File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,12 @@ version control system can provide that information just as well.
157157* [ cf. Google Python Style Guide
158158[ Strings] ( https://google.github.io/styleguide/pyguide.html#310-strings )] *
159159
160+ #### Quotes
161+ Favor double quotes ` " ` over single quotes ` ' ` for regular strings, unless the
162+ string itself contains double quotes. If the string contains both single and
163+ double quotes, pick whatever requires less escaping inside the string.
164+
165+ #### String Formatting
160166Use ` f"...{var}" ` when writing Python 3.6+ code, or ` "...{0}".format(var) `
161167anywhere. ` "..." + var ` may be used for simple cases, but beware of pitfalls
162168such as easily missed whitespace, or ` var ` not being a string. Don't use the
You can’t perform that action at this time.
0 commit comments