pxeger / whython

Fork of Python with some terrible custom features hacked in
https://www.pxeger.com/2021-09-19-hacking-on-cpython/
Other
16 stars 3 forks source link

Allow monkey patching on builtin types #10

Open cgccuser opened 2 years ago

cgccuser commented 2 years ago

Currently, if you try something like str.foo = 3, you get this:

Traceback (most recent call last):
  File ".code.tio", line 1, in <module>
    str.foo = 3
TypeError: can't set attributes of built-in/extension type 'str'

This "feature" may or may not be extremely hard to implement.