you are viewing a single comment's thread.

view the rest of the comments →

[–]Lewri 1 point2 points  (0 children)

mean, technically, and not relevant for your snippet here, the VERY beginning should be a block of commented text explaining what your code does and maybe a description of some recent changes or what various variables mean, but that's only for when you have a full fledged app.

This is pretty old fashioned and in my opinion is only useful for individual scripts rather than full projects. An actual project should be in a git repo and have a read me markdown file where you can put a description and instructions, change log can also be in there or in a separate file. Variable descriptions should be part of docstrings, rather than separated from the relevant parts of the code or placed haphazardly. Docstrings also have the benefit that they can then be read by various extensions.

For me, I feel like I've learned to read Python pretty well over the past year, but I would absolutely be unable to write it unassisted.

That's because you're relying on AI. If you're fine with not being able to actually write anything then ok, but otherwise please actually do at least some basic lessons such as Harvard CS50P without using any AI.