Skip to content
This repository has been archived by the owner on Nov 14, 2019. It is now read-only.

A subclass of tuple that allows for named attribute access. Note that a structure with the same name and usage is available in Python 2.6 as collections.namedtuple, but this is smaller and available in Python 2.4+. If you ask the question "should I use this or collections.namedtuple?" the answer will invariably be the latter. The only real benef…

Notifications You must be signed in to change notification settings

jasonbot/namedtuples-without-code-templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Namedtuples, without code templates!

A subclass of tuple that allows for named attribute access. Note that a structure with the same name and usage is available in Python 2.6 as collections.namedtuple, but this is smaller and available in Python 2.4+. If you ask the question "should I use this or collections.namedtuple?" the answer will invariably be the latter. The only real benefit this offers is that it is implemented in pure Python and does not generate any code, whereas the Python-sanctioned version has a Python code template string it customizes and runs eval() on. If that makes you nervous/angry, this is your alternative.

License

I release this into the public domain.

About

A subclass of tuple that allows for named attribute access. Note that a structure with the same name and usage is available in Python 2.6 as collections.namedtuple, but this is smaller and available in Python 2.4+. If you ask the question "should I use this or collections.namedtuple?" the answer will invariably be the latter. The only real benef…

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages