Hello,
I think it's right like result.
You set name of S to Jack and call one on this. So attribut m equal 5.
You set name of P with other value. So attribut m equal 0.
And you call two on P. It returns 'no' if m equal 0. This is the case.
Sorry, i have read the subject too fast.
I don't know if can it a solution, but you have the design pattern singleton for this.
You can found this on the web for python
I think it's right like result.
You set name of S to Jack and call one on this. So attribut m equal 5.
You set name of P with other value. So attribut m equal 0.
And you call two on P. It returns 'no' if m equal 0. This is the case.
Sorry, i have read the subject too fast.
I don't know if can it a solution, but you have the design pattern singleton for this.
You can found this on the web for python