On Fri, 05 Feb 2010 15:21:05 +0100, mk wrote: > if isinstance(cmd, str): > self.cmd = cmd.replace(r'${ADDR}',ip) > else: > self.cmd = cmd > > or > > self.cmd = cmd > if isinstance(cmd, str): > self.cmd = cmd.replace(r'${ADDR}',ip)
Whichever one you like. The differences are insignificance, and essentially boil down to personal preference. -- Steven -- http://mail.python.org/mailman/listinfo/python-list