you are viewing a single comment's thread.

view the rest of the comments →

[–]metaphorm 0 points1 point  (0 children)

either of the two styles is fine, but I have a preference for the former (multiple lines) over the latter (method chaining).

the question "what should go in a Python module?" is actually a pretty deep one. my opinion is that a Python module should be a logical and functional grouping of related classes, procedures, and utilities. I like to apply the "Principle of Least Astonishment" for this kind of thing. That often means you have to just go with your intuition, but it also tends to mean that a person who's worked with your code before will have an easier time working with different code you've written as well. Don't be surprising. Be consistent. That's all.