On 12/6/16 2:08 PM, Jun Wu wrote:
> Excerpts from Kostia Balytskyi's message of 2016-12-06 13:54:02 +0000:
>> This is what happens if you don't inherit the class or don't override
>> the empty KEYS list in the inherited class.
> If KEYS is used to verify existence, how about just making it a list of
> strings, instead of tuples? The "required" boolean flag seems to be
> unnecessary.
That is true and I've thought about it: just store the list of required 
keys in KEYS.
The reason I want optional keys to be in this list is verbosity. I 
someone else wrote
the subclass for some key-value file, I as a maintainer have a single 
place to see all
the fields "desired" (required and optional) by current version of code. 
So the purpose
of optional keys there is documentation and readability.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to