[issue6751] Default return value in ConfigParser

2010-08-09 Thread Łukasz Langa
Łukasz Langa 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 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 and you wouldn't

[issue6751] Default return value in ConfigParser

2010-08-03 Thread Éric Araujo
Éric Araujo added the comment: Why is it needed to add varargs and kwargs instead of only a new “default” argument? -- ___ Python tracker ___ ___

[issue6751] Default return value in ConfigParser

2010-08-03 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +lukasz.langa, merwok ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue6751] Default return value in ConfigParser

2010-07-22 Thread Juan Javier
Changes by Juan Javier : Added file: http://bugs.python.org/file18123/test_cfgparser.py.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue6751] Default return value in ConfigParser

2010-07-22 Thread Juan Javier
Juan Javier 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: http://bugs.python.org/file18122/configparser.py.d

[issue6751] Default return value in ConfigParser

2010-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc 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 ___ Py

[issue6751] Default return value in ConfigParser

2010-07-10 Thread Mark Lawrence
Mark Lawrence added the comment: A short inline patch is proposed, would something like this be acceptable? -- nosy: +BreamoreBoy stage: -> patch review ___ Python tracker ___ _

[issue6751] Default return value in ConfigParser

2009-08-21 Thread Juan Javier
New submission from Juan Javier : 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 present. It could be done o