next up previous index
Next: Functional Programming Style where Up: Coding Guidelines Previous: Typing Issues   Index

Strings

When constructing strings by combining string parts and values, use the % operator instead of the + operator, e.g. use

'Could not find %s in file %s' % (value, file_name)

not 'Could not find ' + value + ' in file ' + file_name.

When quoting strings, favor single quotes (') over double-quotes, except where that doesn't make sense.


next up previous index
Next: Functional Programming Style where Up: Coding Guidelines Previous: Typing Issues   Index
info (at) urbansim.org