twisted: problem with sftp-client

2008-01-23 Thread Kristian Domke
Hello Folks, I don't know, if it is ok to post large portions of code, but I have really no idea where the problem lies, so I don't have much of a choice. I am programming a tool, which in the end shall connect to an sftp-server, take the list of files in a specified directory, searches for some

Why not 'foo = not f' instead of 'foo = (not f or 1) and 0'?

2008-01-23 Thread Kristian Domke
Hello to all 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 In this case f may be None or a string. If I am not wrong here, one could simply write foo = not f becaus