Start New Discussion within our Software Development Community
inc = (1).__add__
sub = (-1).__radd__

IT/Science/Contracts/Religious translation/interpreting FIN-ENG-FIN
Python programming

Actually, nothing beats the convenience of C language n++ and n--
The eggheads of Python have discussed this, but have not acted.

... The argument about n++ and n-- is that there is also --n and ++n and that C allows assigning as well as auto increment/decrement in one statement, which is both error prone and hard to maintain.

Overall, I'm happy with the decision to leave it out of Python. writing x += 1 and not having to read and debug some horrible x, y = ++y, x++ or whatever is fine.

The article starter has earned a lot of community kudos, and such articles offer a bounty for quality replies.