r/Python • • Apr 29 '20

Discussion Tab vs Spaces

Post image
702 Upvotes

72 comments sorted by

View all comments

1

u/lolitsroo Apr 30 '20

Unsure if other people have ran into this, but Google Cloud Platform won't deploy your function if you have 1 inconsistent spacing in your code (at least in Cloud Functions). Super frustrating. It defaults to 4 spaces and as a tab person it gets annoying. This reminded me of that

4

u/Sukrim Apr 30 '20

Afaik go won't even compile code that's not formatted correctly.

1

u/Wilfred-kun Apr 30 '20
>>> for i in "hello":
...     print(i)    # 4 spaces
...     print(i)    # tab
  File "<stdin>", line 3
    print(i)
    ^

0

u/Sukrim Apr 30 '20

There should be a Python distro called "Black Mamba" that only accepts code formatted with black! :D