To have a list of logging levels in Python 2 I have to call this:
logging._levelNames.keys()
While Python 3 logging module has this:
list(logging._nameToLevel)
I am just adding six
to my project to provide compatibility between Python 2 and Python 3. What is the cleanest way to figure out this compatibility issue?