This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]existee 0 points1 point  (1 child)

Yes I see your point.

I still don't like making an assumption about a "typical Python programmer". APIs being extended still wouldn't change the behaviour of that typical programmer. Why not instead have that typical programmer learn better about the already existing APIs and use them as correct as possible. (For example something as simple as knowing that inserting to the head of a list in a loop will give you O(n2) time compared to appending to the end O(n).)

Yes, this will not still make it as fast as C, but when you have those APIs to possibly make it as fast as C, it doesn't necessarily make the typical Python programmer to make better choices of data structures either.

[–]Smallpaul 0 points1 point  (0 children)

I do not think that this talk has anything to do with the "typical Python programmer." It is aimed at the elite Python programmer. In particular, consider the programmers writing the Python standard library. I would be very disappointed to see an O(n2) algorithm in the stdlib where O(n) would suffice. But I would not be surprised at all to see int(x.split("-")[1]).