On Sun, 03 Jul 2005 15:40:38 -0500, Rocco Moretti <[EMAIL PROTECTED]> wrote:
>Jp Calderone wrote:
>> On Fri, 01 Jul 2005 15:02:10 -0500, Rocco Moretti
>> <[EMAIL PROTECTED]> wrote:
>>
>>>
>>> I'm not aware of a language that allows it, but recently I've found
>>> myself wanting the ability to transparently replace objects.
>>
>>
>> Smalltalk supports this with the "become" message.  I have also done an
>> implementation of this for Python.
>
>As a pure Python module, or do you have to recompile the interpreter?

Somewhere in between, I guess.  The module is all Python, but relies pretty 
heavily on one particular stdlib extension module.

The code is rather short, and online here:

  http://divmod.org/users/exarkun/become.py

Jp
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to