This question is frivolous but I consider it a quality-of-life/Python trivia issue.
I find myself writing x is not None
often. Is there a clever semantically equivalent way of writing that more succinctly? Or is
this an example of the "only one way" maxim in action?
PEP 20, The Zen of Python
There should be one--and preferably only one--obvious way to do it.
If anyone knows something magic, great. And if you have tried and failed to figure something out, let yourself be counted.