As I wrote in my last post, I'm moving this blog to a new domain. I also decided to put it behind cloudflare to enforce HTTPS and other cool stuff (IPv6, HTTP/2, ChaCha20/Poly1305, etc.) Apparently, google doesn't like that. Now, instead of a nice 301 redirect I get this
There are quite a few ways you can format a multi-line function call/list/dictionary in a programming language. With Python (at least with PEP8) it's just two ways: hanging indentation and vertical indentation. The latter is quite straight-forward and I mention it in the notes below. The former one is what this post is about. Well, about a minor but important question of where to place the closing bracket when using it. Yes, style is much more than formatting the commas and brackets so let's settle this and move on to the more important questions. When using hanging indentation, the only true way is this one(*): some_tuple = ( # Nothing here, only opening bracket. item1, item2, item3, item4, # Several items on one line is acceptable though not recommended. item5, # Last comma is important. And never, never place the closing bracket here. ) # Again, nothing here but the bracket and it's on the same level as the opening line. Empty line after the o