4 Mar
2014
4 Mar
'14
7:41 a.m.
On 04/03/2014 00:52, Itamar Turner-Trauring wrote:
On 03/03/2014 01:09 PM, Adi Roiban wrote:
What do you think? Should I go ahead and add options as __init__ arguments or think of a configuration system?
A configuration system would take a while to design and meanwhile these unrelated features would languish, so I'd suggest you start with options to __init__.
-1 I hate __init__ methods with a hojillion parameters, and that's where this leads. +1 instead for class variables which can be overridden in sub-classes to achieve DRY and/or set after instantiation if necessary e.g. class Foo: maxThingLen = 10000 class MyFoo(Foo): maxThingLen = 100 This is also somewhat consistent with what things like t.w.s.Site already do.