On Mon, Feb 7, 2011 at 3:26 PM, trylks <try...@gmail.com> wrote: > I don't know if it is ftplib or just me, but something feels terribly wrong > in this: > >> from ftplib import FTP >> from functools import partial >> >> class MyFTP(FTP): >> def dir(self): >> l = [] >> super(MyFTP, self).dir(partial(lambda l, e: l.append(e.split()), l)) >> return l
No need to use partial here. You can simplify that to: super(MyFTP, self).dir(lambda e: l.append(e.split())) -- http://mail.python.org/mailman/listinfo/python-list