[issue6751] Default return value in ConfigParser

2010-08-09 Thread Łukasz Langa
Łukasz Langa luk...@langa.pl added the comment: This issue is superseded by #9421. -- resolution: - duplicate status: open - closed superseder: - configparser.ConfigParser's getint, getboolean and getfloat don't accept `vars` ___ Python tracker

[issue6751] Default return value in ConfigParser

2010-08-07 Thread Juan Javier
Juan Javier jjdomingu...@gmail.com added the comment: I would like the method to have the exact same behavior as before if the default argument is not present, and return the given default value when deafult argument is present. If you simply add a default keyword, it will always be present

[issue6751] Default return value in ConfigParser

2010-08-03 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +lukasz.langa, merwok ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6751 ___ ___

[issue6751] Default return value in ConfigParser

2010-08-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Why is it needed to add varargs and kwargs instead of only a new “default” argument? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6751

[issue6751] Default return value in ConfigParser

2010-07-22 Thread Juan Javier
Juan Javier jjdomingu...@gmail.com added the comment: I've applied the enhancement to the three parsers, actually I've made the change to RawconfigParser with a small change to ConfigParser. I've also created some unit tests. -- keywords: +patch Added file:

[issue6751] Default return value in ConfigParser

2010-07-22 Thread Juan Javier
Changes by Juan Javier jjdomingu...@gmail.com: Added file: http://bugs.python.org/file18123/test_cfgparser.py.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6751 ___

[issue6751] Default return value in ConfigParser

2010-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The idea is fine (dict.get also has a 'default' parameter) but this patch is very incomplete: - the enhancement should be applied to the three Parsers - it needs unit tests. -- nosy: +amaury.forgeotdarc

[issue6751] Default return value in ConfigParser

2010-07-10 Thread Mark Lawrence
Mark Lawrence breamore...@yahoo.co.uk added the comment: A short inline patch is proposed, would something like this be acceptable? -- nosy: +BreamoreBoy stage: - patch review ___ Python tracker rep...@bugs.python.org

[issue6751] Default return value in ConfigParser

2009-08-21 Thread Juan Javier
New submission from Juan Javier jjdomingu...@yahoo.com: I think it is useful, at least for me, to add an argument, default, to [Safe,Raw]ConfigParser.get that, if present, will be returned if the methid fails to return the value. That is, instead of rasing an exception, return default, if