def register(self, addr, ttl):
        """Initiate the process of registering with a BBMD."""
        # a little error checking
        if ttl <= 0:
            raise ValueError("time-to-live must be greater than zero")

        # save the BBMD address and time-to-live
        if isinstance(addr, Address):
            self.bbmdAddress = addr
        else:
            self.bbmdAddress = Address(addr)
        self.bbmdTimeToLive = ttl

        # install this task to run when it gets a chance
        self.install_task(when=0)
def register ( self , addr , ttl ) : if ttl <= 0 : raise ValueError ( "time-to-live must be greater than zero" ) if isinstance ( addr , Address ) : self . bbmdAddress = addr else : self . bbmdAddress = Address ( addr ) self . bbmdTimeToLive = ttl self . install_task ( when = 0 )
Initiate the process of registering with a BBMD.