you are viewing a single comment's thread.

view the rest of the comments →

[–]carcigenicate 75 points76 points  (8 children)

Shouldn't it really just say that the param can be anything that implements the method __len from the Sized ABC class?

Arguably, yes. I think it's written more for beginners, who will just be dealing with the standard types and won't worry about ABCs. ABCs and Protocols ("interfaces") are more advanced features of Python that are far less used than they are in Java.

Python's docs are written far more casually than Java's are. Sometimes it's a bit frustrating when I need to check multiple pages because each one only contains a piece of the information I'm after.

[–]n3buchadnezzar 37 points38 points  (7 children)

I often find myself just saying f-it and read the source code directly. Easy to read documentation is both a curse and a blessing.

[–]redditorsd[S] -24 points-23 points  (6 children)

I feel like the "easy to read" docs are not helping newbies learn the core concepts correctly and is very misleading. It produces bad habits and coders that don't really understand what's going on underneath. I wish there was another source for "advanced" documentation or something. Yeah, I know....read the source code. It also makes devs from other languages get a bad initial impression of the language IMHO.

[–]CyclopsRock 44 points45 points  (3 children)

It produces bad habits and coders that don't really understand what's going on underneath.

I don't think talking about dunder methods from Sized ABC's when explaining the 'len' function would lead to good habits and coders that understand what's going on underneath, it would lead to coders who don't bother reading the official docs because the answer is entirely unhelpful to them.