[Mailman-Developers] Code Duplicacy

Harshit Bansal harshitbansal2015 at gmail.com
Tue May 24 14:18:01 EDT 2016

I was writing the new 'IStyle' interface and after completing some part of
it I realised that the code has become a bit repetitive as all the
styleable attributes which are present in src/interfaces/mailinglist.py are
to be copied to src/interfaces/styles.py in IStyle interface. For example,

advertised = Attribute(
    """Advertise this mailing list when people ask for an overview of the
available mailing lists.""")

This piece of code is now present in both src/interfaces/mailinglist.py and
src/interfaces/styles.py. Is there any way to correct it or is it fine?
One approach that I am able to think of is to write one seperate interface
containning all the styleable attributes and implement that interface both
in src/model/mailinglist.py and src/model/styles.py.

Harshit Bansal.

More information about the Mailman-Developers mailing list