paint-brush
Making List-Like Objects in Python - The Right Wayby@transifex
5,942 reads
5,942 reads

Making List-Like Objects in Python - The Right Way

by transifex22mSeptember 13th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Python is the #1 localization platform for developers. We will be diving into some quirks of Python that might seem a bit weird. In this post, we will be talking about how Python likes to deal with "list-like objects" We will hopefully teach you how to build something that could actually be useful while avoiding common mistakes.Part 1: Making List-Like Objects in Python - The Right Way to Use Python is part 1: Fake lists. Part 1: Def __getitem__(f) is the method you override if you want your instances to respond to the square bracket notation.

Company Mentioned

Mention Thumbnail
featured image -  Making List-Like Objects in Python - The Right Way
transifex HackerNoon profile picture
transifex

transifex

@transifex

The #1 localization platform for developers.

L O A D I N G
. . . comments & more!

About Author

transifex HackerNoon profile picture
transifex@transifex
The #1 localization platform for developers.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite