Friendly reminder that NamedTuple is a cool thing in Python

Follow

@sir
It is! However there are cases where the initialising overhead hurts (every new namedtuple() is roughly as expensive as an import, perfectly fine on the module scope, deadly in a loop).

Sign in to participate in the conversation
chaos.social

chaos.social - because anarchy is much more fun with friends.
chaos.social is a small Mastodon instance for and by the Chaos community surrounding the Chaos Computer Club. We provide a small community space - Be excellent to each other, and have a look at what that means around here.
Follow @ordnung for low-traffic instance-related updates.
The primary instance languages are German and English.