Peter Otten wrote:

> def levelnames():
>     try:
>         names = logging._nameToLevel
>     except AttributeError:
>         names = (name for name in logging._levelNames if isinstance(name,
> str))

Trainwreck alert :(

I recommend that you use the following list

"DEBUG INFO WARN ERROR CRITICAL".split()

directly rather than fixing the above.


-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to