[issue14233] argparse: append action fails to override default values

2012-03-08 Thread guilherme-pg
New submission from guilherme-pg guilherme.p.g...@gmail.com: Trying to set a default value to arguments whose action is append causes argparse to raise AttributeError when such arguments are provided in the command line (see attached test case t1.py). This happens because _AppendAction

[issue14233] argparse: append action fails to override default values

2012-03-08 Thread guilherme-pg
Changes by guilherme-pg guilherme.p.g...@gmail.com: -- type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14233 ___ ___ Python

[issue14191] argparse: nargs='*' doesn't get out-of-order positional parameters

2012-03-06 Thread guilherme-pg
guilherme-pg guilherme.p.g...@gmail.com added the comment: I uploaded an incomplete patch that might address the issue so it can be discussed. This patch introduces 'greedy_star', a new constructor parameter to ArgumentParser that makes * positional arguments behave as expected in the test

[issue14177] marshal.loads accepts unicode strings

2012-03-02 Thread guilherme-pg
guilherme-pg guilherme.p.g...@gmail.com added the comment: The attached patch attempts to solve the issue. It makes sure marshal.loads only accepts objects conforming to the buffer protocol, updates the documentation for the method accordingly, adds a test case and updates existing test cases

[issue14177] marshal.loads accepts unicode strings

2012-03-02 Thread guilherme-pg
guilherme-pg guilherme.p.g...@gmail.com added the comment: Oops, sorry, that was unintended. I uploaded a new version of the patch with the correct documentation update, making it explicit that loads() expects a bytes object. -- Added file: http://bugs.python.org/file24717/14177

[issue14177] marshal.loads accepts unicode strings

2012-03-02 Thread guilherme-pg
guilherme-pg guilherme.p.g...@gmail.com added the comment: Guilherme Gonçalves guilherme.p.g...@gmail.com Thanks for the quick review. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14177