-
Notifications
You must be signed in to change notification settings - Fork 44
Closed
Labels
question / discussionFurther information is requestedFurther information is requestedrefactor / cleanupImproves readability or maintainabilityImproves readability or maintainability
Milestone
Description
My feelings:
prefer double quotes over single quotes: "string", not 'string'
prefer quote escaping over single quotes : "\"hello\" world", not '"hello" world' (see comment below)
prefer single quotes around strings over quote escaping: '"hello" world', not "\"hello\" world"
prefer format strings over string concatenation and str(): "hello %s!" % place, not "hello " + place + "!", not str("hello", place)
except for very simple cases/single concatenation: "hello " + place, not "hello %s" % place
split long strings into shorter ones with string concatenation "" + "" + ..., not str("", "", ...)
print(
"pretend that this" +
"is a really long" +
"message"
)Metadata
Metadata
Assignees
Labels
question / discussionFurther information is requestedFurther information is requestedrefactor / cleanupImproves readability or maintainabilityImproves readability or maintainability