Sujet : Re: Two aces up Python's sleeve (Posting On Python-List Prohibited)
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.pythonDate : 08. Nov 2024, 02:10:34
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vgjoe9$2stii$2@dont-email.me>
References : 1 2 3
User-Agent : Pan/0.160 (Toresk; )
On Thu, 07 Nov 2024 12:55:53 +0530, Annada Behera wrote:
I heard this behavior is because python's integers are immutable.
Nothing to do with that.
++x or x++ will redefine 5 to 6, which the interpreter forbids ...
One of those is actually syntactically valid.
It just won’t do what you expect it to do.