Skip to content

Pythonic#2

Merged
bladecoder merged 4 commits intobladecoder:mainfrom
danigm:pythonic
Nov 23, 2023
Merged

Pythonic#2
bladecoder merged 4 commits intobladecoder:mainfrom
danigm:pythonic

Conversation

@danigm
Copy link
Contributor

@danigm danigm commented Nov 23, 2023

Modify the python API to make it more pythonic using python magic methods.

This patch implements the __len__, __bool__, __getitem__ and __iter__
magic methods in the Choices class to make it possible to write more
pythonic code and just use it like a python list.
@bladecoder bladecoder merged commit a1a423e into bladecoder:main Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants