[issue29002] typing.AnyStr doc is unclear about python2 unicode support

2016-12-17 Thread Alex Jurkiewicz
New submission from Alex Jurkiewicz: The typing.AnyStr documentation: https://docs.python.org/3/library/typing.html#typing.AnyStr It gives some examples using u-strings (u'foo') but doesn't make explicit some subtleties about behaviour with Python 2. Specifically, with Python 2

[issue28112] Add callback to functools.lru_cache

2016-09-12 Thread Alex Jurkiewicz
Alex Jurkiewicz added the comment: OK, thanks for the feedback. For future searchers I am using the pylru module instead: https://pypi.python.org/pypi/pylru -- ___ Python tracker <http://bugs.python.org/issue28

[issue28112] Add callback to functools.lru_cache

2016-09-12 Thread Alex Jurkiewicz
New submission from Alex Jurkiewicz: I'd like to add support for functools.lru_cache to have a callback parameter that runs every time an item is evicted from the cache. I've written a small prototype here: https://github.com/alexjurkiewicz/cpyt

[issue15613] argparse ArgumentDefaultsHelpFormatter interacts badly with --arg and nargs=+

2012-08-09 Thread Alex Jurkiewicz
New submission from Alex Jurkiewicz: Sample code: #!/usr/bin/env python import argparse print("\n\narg=foo, nargs=+") parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('foo', nargs='+', help=