Define pretty printers for more standard library modules
Here's a to-do list of standard library modules to write prettyprinter definitions for. This is just a list of the modules that I would personally find useful to have definitions for, so feel free to add to the list.
If it's not checked, it's not being worked on, so feel free to submit a PR. You can submit partial definitions for a module.
- [x] Built-in Exceptions
- [x]
collections - [ ]
re - [x]
functools(partial) - [x]
pathlibthanks @RazerM - [ ]
logging - [ ]
email - [ ]
inspect(Signature, etc.) - [x]
ast - [ ]
unittest.mock - [x]
urllib.parse(ParseResult,SplitResult) - [ ]
ipaddress - [ ]
argparse - [ ]
io - [ ]
hashlib
As the number of definitions grows, it may become infeasible to import all these modules along with prettyprinter to register their definitions. A mechanism for deferred type definition, such as the one used by IPython.lib.pretty would be useful.
fwiw it looks like functools.partial and urllib.parse have been taken care of?
In [1]: functools.partial(lambda x: x, y=1)
Out[1]:
functools.partial(
<lambda>, # function
1,
y=1
)
In [2]: urllib.parse.urlsplit("http://www.google.com")
Out[2]:
urllib.parse.SplitResult(
scheme='http',
netloc='www.google.com',
path='',
query='',
fragment=''
)
In [3]: urllib.parse.urlparse("https://www.google.com")
Out[3]:
urllib.parse.ParseResult(
scheme='https',
netloc='www.google.com',
path='',
params='',
query='',
fragment=''
)
Yep, these are now taken care of :+1: I modified the checklist