Python apparently does hate me.
- In order to import a library from a sibling folder, e.g.
../lib/test.py
, I needimport sys; sys.path.append('..')
. Otherwise,from ..lib import test
will fail. - What is the naming convention regarding
CamelCase
orunderscore_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 notlogging.basic_config
orlogging.config
orlogging.level = logging.INFO
? I'm assuminglogging.INFO
is a constant and therefore CAPITAL.