Making List-Like Objects in Python - The Right Wayby@transifex
4,294 reads

Making List-Like Objects in Python - The Right Way

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

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


Receive Stories from @transifex

react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa