Changes by Łukasz Langa luk...@langa.pl:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9421
___
___
Python-bugs-list
Łukasz Langa luk...@langa.pl added the comment:
Actually the square bracket form is how `range()` is documented so there is
some limited precedent in that regard.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9421
Łukasz Langa luk...@langa.pl added the comment:
On IRC Fred asked:
Why are delimiters and comment_prefixes in the constructor signatures?
Like most configurable options, they were added to the initializer one by one
(after `allow_no_value`). Only later did I notice that actually things like
Georg Brandl ge...@python.org added the comment:
I agree with msg115525.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9421
___
___
Fred L. Drake, Jr. fdr...@acm.org added the comment:
My question in IRC wasn't intended to mean why are we passing settings to the
constructor so my much as why are these configuration settings; sorry I
wasn't clear.
Have we encountered actual use cases that are not covered by the existing
Fred L. Drake, Jr. fdr...@acm.org added the comment:
Regardless, my concerns about including delimiters and comment_prefixes as
settings is irrelevant to this issue. The changes to them probably shouldn't
have been part of this issue to begin with, but I'll try not to lose sleep over
it at
Fred L. Drake, Jr. fdr...@acm.org added the comment:
The patch has been commited largely as-is (r84486).
I'm not happy with the documentation yet:
- Markup like this:
.. method:: ConfigParser.getint(section, option, raw=False,
[vars, default])
doesn't sit well with me.
Changes by Łukasz Langa luk...@langa.pl:
Removed file: http://bugs.python.org/file18458/issue9421.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9421
___
Łukasz Langa luk...@langa.pl added the comment:
Patch updated:
- _UNSET removed from docs in favor of a more natural syntax (square brackets
around optional arguments)
- _COMPATIBLE left in the docs because I find less magical in that case (+ it's
already covered in the docs what this special
Fred L. Drake, Jr. fdr...@acm.org added the comment:
- Using _UNSET similar in the docs is not good; there used to be a
way to note a parameter as optional. Not sure whether there is any
more.
- Docs for methods which take vars/default should include a note
indicating where to find the
Łukasz Langa luk...@langa.pl added the comment:
I am away from the computer at the moment but doing my best to reply.
- Using _UNSET similar in the docs is not good; there used to be a
way to note a parameter as optional. Not sure whether there is any
more.
I don't know where to look
Fred L. Drake, Jr. fdr...@acm.org added the comment:
Even I think the leading underscore screams don't use this from
outside, doofus!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9421
Fred L. Drake, Jr. fdr...@acm.org added the comment:
The getters should all accept a `default` argument that's used when no value is
found in the configuration. If the default is given, that should be returned
(without conversion), instead of raising an exception.
This can be included in the
Łukasz Langa luk...@langa.pl added the comment:
Patch included.
New type-related unit tests have shown undesirable behaviour of read_dict()
when the given option values are not strings. Support for numbers, booleans and
Nones is likely to be expected so this change was introduced. `default'
Changes by Łukasz Langa luk...@langa.pl:
Removed file: http://bugs.python.org/file18457/issue9421.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9421
___
Łukasz Langa luk...@langa.pl added the comment:
Patch updated to never type-convert default= arguments. This behaviour is more
predictable.
--
Added file: http://bugs.python.org/file18458/issue9421.diff
___
Python tracker rep...@bugs.python.org
Changes by Łukasz Langa luk...@langa.pl:
--
assignee: - lukasz.langa
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9421
___
___
Python-bugs-list
Changes by Łukasz Langa luk...@langa.pl:
--
nosy: +fdrake
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9421
___
___
Python-bugs-list mailing list
Fred L. Drake, Jr. fdr...@acm.org added the comment:
+1 to making support for `vars` consistent across the parser classes.
This needs to include documentation (stand-alone + docstrings) that actually
make sense; the current docs require reading the code to understand what is
going on.
New submission from Łukasz Langa luk...@langa.pl:
ConfigParser (and in effect SafeConfigParser) accept `vars` in the `get()`
method so one can override values from the section, merge data from different
sources or simply state some required keys for interpolation.
`getint()`, `getfloat()` and
20 matches
Mail list logo