Mar-18-2020, 02:34 PM
Consider the following class:
Is this a feature of Python or maybe it's my IDE (I'm using Spyder 3.7).
class a: def __init__(self,T): self.T=TNow, if I set
x=a(3) y=a(4)we find that x.T is 4, but their pointers are different. Furthermore, if I set x.T=5, y.T remains as 4. If I again produce another variable z=a(6), we find that y.T is 6 as well, but x.T is still 5.
Is this a feature of Python or maybe it's my IDE (I'm using Spyder 3.7).