[Python-ideas] Technical possibilities for a syntax [was: Reverse assignment operators ...]

Stephen J. Turnbull turnbull.stephen.fw at u.tsukuba.ac.jp
Wed Nov 16 22:07:34 EST 2016


Nick Timkovich writes:

 > I think the best way to remove compound operators would be to go
 > back in time and hit Dennis Ritchie with a bat at the exact moment
 > when the notion of them crosses his mind.

True enough as a concept, but Python didn't have to implement them for
immutables.  It might have been interesting to allow in-place
operations only for mutables.

Dunno if Guido thought of that at the time, and I suspect that a lot
of the voices that convinced him to go against his instincts wanted
them specifically for integers (a lot of people wanted "++" and "--",
too).  So even if he did think of it, it might not have satisfied the
proponents that their needs were being addressed.

 > Except Perl.

Please don't.

Perl has its weaknesses, but it has its strengths too.  I suspect that
Python regexps were strongly influenced by PCRE, and that the
Cheeseshop has borrowed a feature or two from CPAN.



More information about the Python-ideas mailing list