this post was submitted on 12 Feb 2025
16 points (78.6% liked)

Python

6908 readers
2 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

๐Ÿ“… Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

๐Ÿ Python project:
๐Ÿ’“ Python Community:
โœจ Python Ecosystem:
๐ŸŒŒ Fediverse
Communities
Projects
Feeds

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 1 points 1 month ago

don't break up long functions

Some things are so complex they can only be understood in long functions. Break up the long functions and what's going on is lost.

Only have one example where the complexity is best left alone, the heart of a requirements management package. Where the whole is greater than the sum of it's parts. Or the parts lose meaning if taken in isolation.

docstrings

surprised flake8+black even allows a comment as the docstring.

Prefer triple single quotes over triple double quotes. But black slapped me back into conformance. Of course i'm right, but evidently that's not good enough. So triple double quotes it is.

Slap me often and hard enough, i ~~learn~~ conform.

Except for build backends and requirements management.