Python `if x is not None` or `if not x is None`? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question I’ve always thought of the if not x is None version to be more clear, but Google’s style guide and … Read more

What are the most common Python docstring formats? [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago. The community reviewed whether to reopen this question 4 months ago and left it closed: Original close reason(s) were … Read more

Best way to return multiple values from a function? [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago. Improve this question The canonical way to return multiple values in languages that support it is often tupling. Option: … Read more

Coding Conventions – Naming Enums

Enums are classes and should follow the conventions for classes. Instances of an enum are constants and should follow the conventions for constants. So enum Fruit {APPLE, ORANGE, BANANA, PEAR}; There is no reason for writing FruitEnum any more than FruitClass. You are just wasting four (or five) characters that add no information. This approach … Read more