Change by Varun Agrawal :
--
pull_requests: +14624
pull_request: https://github.com/python/cpython/pull/14832
___
Python tracker
<https://bugs.python.org/issue37
New submission from Varun Agrawal :
Currently, json.load and json.dump take file pointers, aka file-like objects
which have support for `.write()` and `.read()`. This necessitates the
following pattern of code on a regular basis:
```
with open(filename) as f:
o = json.load(f
Varun Agrawal <varagra...@gmail.com> added the comment:
@zach.ware: True, but since we already have a getLevelName method, having a
symmetric method to do the opposite made sense. Plus the method can perform
error checking and other things to ensure much cleane
Varun Agrawal <varagra...@gmail.com> added the comment:
The request is not to set the level but to get the level given the level name
aka textual representation. For example, passing in INFO should return 20 and
passing in CRITICAL should ret
New submission from Varun Agrawal <varagra...@gmail.com>:
Currently, the logging module has a function `getLevelName` and directly
accessing the `_nameToLevel` dict is poor practice bordering on non-pythonic.
It would be nice to have a simple method like `getNameLevel` in the
Varun Agrawal added the comment:
Hi David,
It seems you already took a look at the man page. There are some subtle
differences such as being unable to match to a directory when the pattern ends
with a forward slash.
Overall, I'd like to see fnmatch be used to create a program that can perform
New submission from Varun Agrawal:
Currently, the fnmatch module in Python does not operate like the Unix
equivalent command. This is especially the case with patterns such as `dir/`
which does not match directory path returned by `os` (which would be `dir`) and
neither does the pattern match