Joseph Maurer wrote:
The way I implemented this feature in Slick-C is with indirection...
Is my proposed implementation a good one for Python?
It's nowhere near detailed enough to be able to tell. When Steven said "figure out how to implement it", he meant working out the details, not just coming up with a high-level idea. What you suggest sounds like it ought to be possible, at first sight, since Python function objects are already containers with a reference to another object that holds the function's code. The problem will be figuring out *when* you're redefining a function, because the process of loading a module is a very dynamic one in Python. Defining functions and classes is done by executing code, not by statically analysing declarations as a C compiler does. -- Greg