def __init__(self, ptype='depute', legislature=None):
        """
        type: depute or senateur
        legislature: 2007-2012 or None
        """

        assert(ptype in ['depute', 'senateur'])
        assert(legislature in ['2007-2012', '2012-2017', None])
        self.legislature = legislature
        self.ptype = ptype
        self.ptype_plural = ptype + 's'
        self.base_url = 'https://%s.nos%s.fr' % (legislature or 'www', self.ptype_plural)
def __init__ ( self , ptype = 'depute' , legislature = None ) : assert ( ptype in [ 'depute' , 'senateur' ] ) assert ( legislature in [ '2007-2012' , '2012-2017' , None ] ) self . legislature = legislature self . ptype = ptype self . ptype_plural = ptype + 's' self . base_url = 'https://%s.nos%s.fr' % ( legislature or 'www' , self . ptype_plural )
type: depute or senateur
        legislature: 2007-2012 or None