seeking deeper (language theory) reason behind Python design choice

Python python at bladeshadow.org
Sun May 13 00:31:20 EDT 2018


On Wed, May 09, 2018 at 03:57:35PM +1000, Chris Angelico wrote:
> On Wed, May 9, 2018 at 3:44 PM, Steven D'Aprano
> > If all programmers were as awesome as you and never made typos, the world
> > would be a better place. But we know from experience that even
> > experienced C programmers can make this mistake by accident.
> 
> Yes, and I'd go further: I *am* too stupid to get this right. 

No, you are not.  Do you ever say "dog" when you mean "dot" instead?
Do you ever say "dad" when you mean "mom" instead?  Internalize that
"=" is "equals" (or "assigns" if you prefer) and "==" is "is equal to"
then use those phrases in your head when you're thinking about which
one you need in your code, and I'm pretty sure you'll stop making this
mistake.  It may help that the phrase with twice as many syllables
represents the operator that has twice as many characters.  Eventually
it becomes second nature, like not calling Dad "Mom."





More information about the Python-list mailing list