[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lua style closures in Python?
- From: "Peter Loveday" <peter@...>
- Date: Mon, 9 Oct 2006 18:04:33 -0400
Greetings!
Perhaps I should be asking this on a python list; but I imagine there are
some people here with experience in both, which is what I really need.
Does anyone know if there is a way in Python to create some sort of function
closures from the tp_getattro function?
Currently, in Lua, I am returning one function pointer with other
information bound into a closure from my __index metamethod, in order to
implement dynamic methods (ie, methods are not known at compile time, so I
bind with a dispatcher function of sorts).
On first inspection, I can't see how this can easily be achieved in Python;
any pointers would be appreciated.
Thanks!
Love, Light and Peace,
- Peter Loveday
eyeon Software