Comment

Comment by progval

> you can update the definition of a class in a running system and update all existing instances of that class

Like this?

    >>> class MyClass:
    ...   attr = 0
    ... 
    >>> my_object = MyClass()
    >>> MyClass.attr = 42
    >>> my_object.attr
    42
    >>> MyClass.method = lambda self: self.attr
    >>> my_object.method()
    42

> When an error occurs you can inspect local variables in any of the stack frames and execute commands in them

What is the difference with https://lukeplant.me.uk/blog/posts/pythons-disappointing-sup... ?

parent progval 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton