I really don’t like Python1, but I have to use it for work, and so I have set myself the goal of learning to appreciate it. This is a list of mostly objective claims about Python that I appreciate. Submissions are welcome, but I’ll only add them if I agree that they’re basically objectively true.
- Python starts up in less than 0.1s, so it can be used for short scripts.
- I guess it is more readable than APL or Cobol.
- You can FFI into
betterother languages relatively easily.
- It has a more complete standard library than OCaml or C.
- Package management is easier than it used to be, I think.
- It has lots of libraries.
- Some apps (e.g., Blender) use Python for scripting, so knowing Python will help there.
- It has official Qt bindings, so should be one of the easier language-choices for making little GUIs.
- Type annotations + Pyright is better than nothing.
- This is not really an objective thing, but I appreciate the fact that the
culture has agreed to import whole namespaces (e.g.
import pandas as pd,
import numpy as np), so you can always tell where a function or class is coming from (e.g.
pd.DataFrame, etc). This also probably helps avoid using “private” APIs: if the top of my file says
from whatever import _hello, a thousand lines further down, it won’t look out of place to call
_hello()(“maybe it’s just a private helper function defined in this file!”). But if you do
import whatever, you’ll have to write
whatever._hello(), which will stick out like a marginally sore thumb.
I’ll add more points as I think of them.
I have an unfinished post titled “Unhinged rant about the Python community” explaining some of my feelings. Maybe one day I’ll publish that too. ↩