Kristian Domke wrote: > I am trying to learn python at the moment studying an example program > (cftp.py from the twisted framework, if you want to know) > > There I found a line > > foo = (not f and 1) or 0
Equivalent to ``foo = int(not f)`` > In this case f may be None or a string. > > If I am not wrong here, one could simply write > > foo = not f No cast to int() here. STeVe -- http://mail.python.org/mailman/listinfo/python-list