Making List-Like Objects in Python - The Right Way

Written by transifex | Published 2020/09/13
Tech Story Tags: python | list-like-objects | code | coding | lists | hackernoon-top-story | python-programming-lists | good-company

TLDR 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.via the TL;DR App

no story

Written by transifex | The #1 localization platform for developers.
Published by HackerNoon on 2020/09/13