[Vm-dev] Recreating live coding in CPython 3.5

Dimitris Chloupis kilon.alios at gmail.com
Wed Oct 11 20:19:00 UTC 2017

Python allows you to inject new variables to an instance through normal
assignement as you can do also with methods. So you replace existing ones
as I mentioned before but also extend the instance with new variables and
methods after its created.

The one thing I thought Python would not allow me to do was to delete
variables and especially methods from an instance but it appears it does
that too. Always during run time of course.

Its safe to assume that the same applies to object classes as well. So
technically this means you have complete freedom on how much you can affect
a live instance. At least thats how it looks to me so far.

On Wed, Oct 11, 2017 at 10:50 PM Bert Freudenberg <bert at freudenbergs.de>

> On Wed, Oct 11, 2017 at 9:32 PM, Jan Vrany <jan.vrany at fit.cvut.cz> wrote:
>> > Indeed such feature is essential for live coding.  I will have to add
>> > it to my implementation thanks.
>> I don't think become: is essential. Smalltalk/X for instance does not
>> use #become: yet it still provides live coding (in my opinion).
> ​Do you know how instances are reshaped without become in Smalltalk/X?​
> But indeed it may not be a problem in Python where instances do not have a
> fixed number of instance variables anyway. You still need to be able to
> enumerate them, to fix them up.
> - Bert -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20171011/e8a50de2/attachment.html>

More information about the Vm-dev mailing list