Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@fiedl
Last active March 6, 2019 16:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fiedl/c0a4a7e29f4703ac334a0048f13bdf3b to your computer and use it in GitHub Desktop.
Save fiedl/c0a4a7e29f4703ac334a0048f13bdf3b to your computer and use it in GitHub Desktop.
Python hates me. It's mutual.

Python apparently does hate me.

  • In order to import a library from a sibling folder, e.g. ../lib/test.py, I need import sys; sys.path.append('..'). Otherwise, from ..lib import test will fail.
  • What is the naming convention regarding CamelCase or underscore_case? PEP8 reads: "Function names should be lowercase, with words separated by underscores as necessary to improve readability". Good. Why then this mess: import logging; logging.basicConfig(level = logging.INFO)? Why not logging.basic_config or logging.config or logging.level = logging.INFO? I'm assuming logging.INFO is a constant and therefore CAPITAL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment