I have some code like this. Should the break occur before the periods or after?
# before
my_var = somethinglikethis.where(we=do_things).where(we=domore).wher
Do what works.
Also, check out this whitepaper on the myths of indentation in Python. That can be found here.
It starts out with:
"Whitespace is significant in Python source code."
No, not in general. Only the indentation level of your statements is significant (i.e. the whitespace at the very left of your statements). Everywhere else, whitespace is not significant and can be used as you like, just like in any other language. You can also insert empty lines that contain nothing (or only arbitrary whitespace) anywhere.
I hope that helps.