Chris Rebert <c...@rebertia.com> writes: > Or, if possible, refactor the conditional into a function (call) so > it's no longer multiline in the first place.
No! This /increases/ cognitive load for readers, because they have to deal with the indirection through the name. If you actually use the function multiple times, the mental overhead of forming the abstraction and associating it with the function name is shared across the various call sites and it's probably worth it. If it's only called once, leave it inline. -- [mdw] -- http://mail.python.org/mailman/listinfo/python-list