Some python idioms

from blog lmno.lol @alvaro, | ↗ original
Prefer double quotes if escaping single quotes. Prefer string interpolation over join. Eg. "'%s'" % member_default. Prefer double underscore for privates. Prefer with statement to implicitly close file. with open(path, 'r') as text_file: text = text_file.read() Prefer list comprehensions to filter. Prefer using separate modules over classes...