News for hackers. Stuff that matters.
Re:PyTorch: Where we are headed and why it looks a lot like ... by dash2 on Saturday November 27, 2021 @03:53AM (#29358723)
> Python was written with people like scientists in mind.

Having just taught a bunch of scientists Python, I'm skeptical of this.

Stuff that is obvious to me, but really hard to explain to coding beginners:

* why `len(list)` but `str.join(...)`? I.e. why are there two ways to call functions?

* why does `[]` do so many different things? List comprehensions, list construction, subsetting, sometimes it secretly calls a method....

* why in the name of god is the first row called 0?

* and then why does [0:3] mean rows 1, 2 and 3, not rows 0, 1, 2, 3 or 1, 2, 3, 4?

* ... except in pandas where sometimes [foo:bar] includes bar...

* in general, why is pandas so damn complex?

I thought it'd be easier to teach than R, but I'm not quite so certain now.

There are no comments on this comment yet.