On 26/05/21 3:33 am, Dennis Lee Bieber wrote:
the OBJECTS have a type and can not change type.

Well... built-in types can't, but...

>>> class A:
...  pass
...
>>> class B:
...  pass
...
>>> a = A()
>>> type(a)
<class '__main__.A'>
>>> a.__class__ = B
>>> type(a)
<class '__main__.B'>

--
Greg

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to