which

Bruno Desthuilliers bruno.42.desthuilliers at websiteburo.invalid
Fri Feb 5 11:02:37 EST 2010


mk a écrit :
(snip)
> So in this context this is fine. But I wanted to make the class more 
> robust. Perhaps I should do smth like this before setting self.cmd?
> 
> assert isinstance(cmd, basestring) or cmd is None, "cmd should be string 
> or None"
> 
> and then:
> 
> if cmd:
>     self.cmd = cmd.replace..

And what if cmd happens to be the empty string ?-)

ok, me --->[]



More information about the Python-list mailing list