██ ██ ███████ ███ ██ ██████ ██████ ██ ██ ██ ███ ███
██ ██ ██ ████ ██ ██ ██ ██ ██ ██ ██ ██ ████ ████
███ █████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ███████ ██ ████ ██████ ██████ ██ ██████ ██ ██
- Prefer double quotes if escaping single quotes.
- Prefer string interpolation over join. Eg. "'%s'" % member_default.
- Prefer double underscore for privates.
- Prefer with statement to implicitly close file.
with open(path, 'r') as text_file:
text = text_file.read()
- Prefer list comprehensions to filter.
- Prefer using separate modules over classes if only using for separation.
- Keep in mind: "eafp vs lbyl" (ie. just let it throw).
- Prefer exceptions over assertions.
- Throw ValueError for wrong input.
- Return explicit False if remaining case is always false.
[^1]: Been using powder milk since lockdown, end-result's been tasty.
[^2]: The app's been fairly stable, but who knows… please backup your org file before feeding it to the lion.
[^3]: The app's been fairly stable, but who knows… please backup your org file before feeding it to the lion.
[^4]: The app's been fairly stable, but who knows… please backup your org file before feeding it to the lion.
[^5]: Yes, this post was written in org mode.
[^6]: Been using powder milk since lockdown, end-result's been tasty.
[^7]: Only tried raw honey so far.
[^8]: Can likely use ground cardamom. I enjoy the scents while crushing.