Are the critiques in "All the things I hate about Python" valid?

Anders Wegge Keller wegge at wegge.dk
Sun Feb 18 22:26:32 EST 2018


På Mon, 19 Feb 2018 08:47:14 +1100
Tim Delaney <timothy.c.delaney at gmail.com> skrev:
> On 18 February 2018 at 22:55, Anders Wegge Keller <wegge at wegge.dk> wrote:


> >  That list is not only weakly typed, but rather untyped. There are no
> > safeguards in the language, that enforce that all elements in a list or
> > other container are in fact of the same type. Before type annotations and
> > mypy, I could not enforce that other than at runtime.

> You couldn't have got the above much more wrong.
 
> As others have said, typing is about how the underlying memory is treated.

 And that is exactly my point. Python does not have a typed list. It have a
list that takes whatever is thrown into it.

 I'll skip the rest, as you totally missed the point.
-- 
//Wegge



More information about the Python-list mailing list