(self, rule, position=0)
Insert *rule* as the first entry in the chain if *position* is 0 or
        not specified, else *rule* is inserted in the given position.
Insert *rule* as the first entry in the chain if *position* is 0 or
        not specified, else *rule* is inserted in the given position.
Insert * rule * as the first entry in the chain if * position * is 0 or not specified else * rule * is inserted in the given position .
def insert_rule(self, rule, position=0):
        """Insert *rule* as the first entry in the chain if *position* is 0 or
        not specified, else *rule* is inserted in the given position."""
        rule.final_check()
        rbuf = rule.rule
        if not rbuf:
            raise ValueError("invalid rule")
        self.table.insert_entry(self.name, rbuf, position)
def insert_rule ( self , rule , position = 0 ) : rule . final_check ( ) rbuf = rule . rule if not rbuf : raise ValueError ( "invalid rule" ) self . table . insert_entry ( self . name , rbuf , position )