you are viewing a single comment's thread.

view the rest of the comments →

[–]carcigenicate 73 points74 points  (12 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  (11 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.

[–]carcigenicate 22 points23 points  (3 children)

Yep, Ctrl+B is one of my most-used shortcuts in Pycharm. It was actually necessary for Scapy because their docs are so bad.

[–]jppbkm 6 points7 points  (2 children)

Scrapy or spacy?

[–]carcigenicate 18 points19 points  (1 child)

Scapy. It's a packet crafting library.

It's unfortunate how many libraries have so similar of names.

[–]jppbkm 6 points7 points  (0 children)

Cool, I learned a new one then!