[Python-ideas] Proposing additions to the standard library
erotemic at gmail.com
Sat Nov 10 20:36:52 EST 2018
I'm interested in proposing several additions to the Python standard
library, and I would like more information on the procedure for doing so.
Are all additions done via a PEP? If not what is the procedure. If so, I've
read that the first step was to email this board and get feedback.
I have a library called `ubelt` that contains several tools that I think
might be worthy of adding to the standard library.
Here's my bullet point pitch:
- Python is batteries included. Ubelt contains extra batteries.
function are extra batteries.
- Most function in ubelt are fast. All 222 tests takes 7.33 seconds.
- Ubelt has 100% test coverage (sans `# nocover` locations).
- I'm only championing a subset of the functions in ubelt. There are
certainly functions in there that do not belong in the standard library.
- I have a Jupyter notebook that give a demo of some select functions
(not necessarily the same as the ones proposed here):
- I do have documentation (mostly in docstrings) and in the docs folder,
but I've been having trouble auto-updating read-the-docs. Here is the link
Here is a tentative list of interesting functions. Hopefully the names are
descriptive (if not, see docstrings: https://github.com/Erotemic/ubelt)
almost everything in util_list:
allsame, argmax, argmin, argsort, argunique,
chunks, flatten, iter_window, take, unique
These functions might be worth modifying into dictionary methods:
Because I built the library, I tend to like all the functions. Its
difficult to decide if they are stdlib worthy, so there might be some false
positives / negatives.
I'm on the fence about:
CacheStamp, Cacher, NoParam, argflag, argval, dzip, delete, hash_data,
hash_file, memoize, memoize_method, NiceRepr, augpath, userhome,
ensure_app_cache_dir, ensure_app_resource_dir, find_exe, find_path,
get_app_cache_dir, get_app_resource_dir, platform_cache_dir,
platform_resource_dir, CaptureStdout, codeblock, ensure_unicode, hzcat,
Its my hope that some of these are actually useful. Let me know any of the
following: what you think, if there are any questions, if something else
needs to be done, or what the next steps are.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas