[Python-ideas] Why operators are useful

Dan Sommers 2QdxY4RzWzUUiLuE at potatochowder.com
Sat Mar 16 08:14:19 EDT 2019


On 3/16/19 6:17 AM, Richard Damon wrote:
> On 3/16/19 4:39 AM, Greg Ewing wrote:
>> Rémi Lapeyre wrote:
>>> I think this omit a very important property of
>>> mathematic equations thought, maths is a very strongly typed language
>>> which can be a significant improvement for readability.
>>
>> Python is very strongly typed too, so I don't really see how
>> maths is different.
> 
> 'Strongly Typed Language' can have slightly different meaning to
> different people. In Python, an object have a very definite type which
> strongly defines what you can do with that object, while other languages
> are less definitive in that aspect. But in Python, names are NOT that
> strongly typed, as a name can be rebound to any sort of object with a
> wide variety of types, compared to other languages where before using
> (or at first use) a variable you need to declare the 'type' that will be
> stored in it, and that type is all that it can hold.

That's not strong vs. weak typing, that's dynamic vs. static typing.

That said, I agree that different people get this wrong.  :-)


More information about the Python-ideas mailing list