[Svnmerge] Long argument processing of OptBase

Daniel Rall dlr at collab.net
Tue Mar 28 14:04:43 PST 2006


On Tue, 28 Mar 2006, Daniel Rall wrote:

> On Tue, 28 Mar 2006, Giovanni Bajo wrote:
...
> > It's a leftover. I don't think there's value in keeping such a replace()
> > right now, so you can throw it away. I can reinstate it if I ever want to
> > change from opts["name"] to opts.name.
> 
> I committed a patch removing the replace in r19068.  But, which style
> would you really prefer?  Manipulating the option object's __dict__ to
> add the instance fields seems simple enough, and using those instance
> fields on the options object instead of treating it as a dictionary is
> quite feasible, too.

I made a two follow-up commits to handle non-OptBase options stored in
the "opts" dictionary (messy, sorry).  While making these changes, I
was thinking about how the flag variable names no longer exactly match
the dictionary element names (e.g. record_only corresponds to
opts["record-only"]).  FWIW, I felt drawn towards your original
strategy on the basis that it might facilitate easier maintenance.
-- 

Daniel Rall




More information about the Svnmerge mailing list