python - Most succinct/low-hassle trick for identity comparison with None? -


this question frivolous consider quality-of-life/python trivia issue.

i find myself writing x not none often. there clever semantically equivalent way of writing more succinctly? or example of "only 1 way" maxim in action?

pep 20, the zen of python

there should one--and preferably one--obvious way it.

if knows magic, great. and if have tried , failed figure out, let counted.

no, there no more succinct way make comparison using is operator.


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -