Message115525
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 optionxform, _boolean_states, etc. are configurable by assignment. So this is a design decision whether one way should be preferred over the other. In a way that's unfortunate that we now have two obvious ways to do it.
I believe that keyword arguments are far better because they are more declarative, e.g.:
parser = SafeConfigParser(delimiters=(':=',),
comment_prefixes=('//',))
vs.
parser = SafeConfigParser()
parser._delimiters = (':=',)
parser._comment_prefixes = ('//',)
It's the way ORMs and many other frameworks do it and it feels natural. |
|
Date |
User |
Action |
Args |
2010-09-03 22:43:49 | lukasz.langa | set | recipients:
+ lukasz.langa, fdrake, georg.brandl, pitrou, michael.foord |
2010-09-03 22:43:49 | lukasz.langa | set | messageid: <1283553829.6.0.323688956026.issue9421@psf.upfronthosting.co.za> |
2010-09-03 22:43:48 | lukasz.langa | link | issue9421 messages |
2010-09-03 22:43:47 | lukasz.langa | create | |
|