which

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Fri Feb 5 17:21:05 EST 2010


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



More information about the Python-list mailing list