[Python-Dev] Python-Dev Digest, Vol 69, Issue 143 (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Fri Apr 17 06:14:06 CEST 2009
- Previous message: [Python-Dev] Python-Dev Digest, Vol 69, Issue 143
- Next message: [Python-Dev] Python-Dev Digest, Vol 69, Issue 143
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Steven D'Aprano wrote:
it should be obvious in the same way that string concatenation is different from numerical addition:
1 + 2 = 2 + 1 '1' + '2' != '2' + '1'
However, the proposed arithmetic isn't just non- commutative, it's non-associative, which is a much rarer and more surprising thing. We do at least have
('1' + '2') + '3' == '1' + ('2' + '3')
-- Greg
- Previous message: [Python-Dev] Python-Dev Digest, Vol 69, Issue 143
- Next message: [Python-Dev] Python-Dev Digest, Vol 69, Issue 143
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]