namedtuples-without-code-templates

namedtuples-without-code-templates

jasonbot

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.

0 Stars
0 Forks
0 Watchers
Python Language
Cost to Build
$9.1K
Market Value
$548

Growth over time

5 data points  ·  2021-08-01 → 2022-09-01
Stars Forks Watchers
💬

How do you feel about this project?

Ask AI about namedtuples-without-code-templates

Question copied to clipboard

What is the jasonbot/namedtuples-without-code-templates GitHub project? Description: "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.". Written in Python. Explain what it does, its main use cases, key features, and who would benefit from using it.

Question is copied to clipboard — paste it after the AI opens.

How to clone namedtuples-without-code-templates

Clone via HTTPS

git clone https://github.com/jasonbot/namedtuples-without-code-templates.git

Clone via SSH

[email protected]:jasonbot/namedtuples-without-code-templates.git

Download ZIP

Download master.zip

Found an issue?

Report bugs or request features on the namedtuples-without-code-templates issue tracker:

Open GitHub Issues