4 ms·
> Empty lines to delineate blocks. Use comments to describe those blocks and their meaning, don't just assume everyone is thinking exactly the same as you are
by qbasic_forever 5y ago
> Empty lines to delineate blocks.
Use comments to describe those blocks and their meaning, don't just assume everyone is thinking exactly the same as you are about the code organization (hint, they probably aren't). Where you see a bunch of logically separated blocks of operations I might be new to the codebase and just see a bunch of unnecessary whitespace. Describe what's being organized and why in comments.
- tayo42 5y agodoes it not allow you do something like this to set up variables? def foo(a,b,c): var x = 40 var y = None bar() return x * b I think the blocks of code make it more readable, some variables are set up, some work is done, then it returns something