New submission from David W. Lambert <[EMAIL PROTECTED]>: http://docs.python.org/dev/3.0/library/ctypes.html#callback-functions
ctypes.xFUNCTYPE are another opportunity to advertise decorators. Please consider inserting yet another qsort example written as a decorator, perhaps as follows. Or---it could be that I'm slow and the average pythonista will figure this out on first read. @CFUNCTYPE(c_int, POINTER(c_int), POINTER(c_int)) def py_cmp_func(*args): (a,b,) = (t[0] for t in args) print("py_cmp_func", a, b) return a-b qsort(ia,len(ia),sizeof(c_int),py_cmp_func) ---------- assignee: georg.brandl components: Documentation messages: 75515 nosy: LambertDW, georg.brandl severity: normal status: open title: ctypes.xFUNCTYPE are decorators. type: feature request versions: Python 3.0 _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4260> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com