Ł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
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
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +lukasz.langa, merwok
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6751
___
___
É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
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:
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
___
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
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
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