I got this problem with 2.6.0. Haven't tried on 2.6.1
from System.Threading import ThreadStart
from functools import partial
def foo(x): pass
ThreadStart(partial(foo,3)) # TypeError: Object is not callable
def mypartial(f,*bind_a,**bind_kw):
def wrapped(*a,**kw):
all_kw = bind_kw.copy()
all_kw.update(kw)
return f(*(bind_a+a),**all_kw)
return wrapped
ThreadStart(mypartial(foo,3)) # ok
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com