summaryrefslogtreecommitdiff
path: root/py/mpconfig.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-04-21 14:14:24 +0000
committerDamien George <damien.p.george@gmail.com>2015-04-21 14:14:24 +0000
commit5aa311d33084c24262780cae0a65d748990ce7e1 (patch)
tree88a87ed9e5a5dcd912fb5e0c9a15ab95a6c465d5 /py/mpconfig.h
parent23a2b11abf22d434be17cfce1c491fca0e9c58f2 (diff)
py: Add attrtuple object, for space-efficient tuples with attr access.
If you need the functionality of a namedtuple but will only make 1 or a few instances, then use an attrtuple instead.
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r--py/mpconfig.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index a403a6663..df18290a2 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -502,6 +502,12 @@ typedef double mp_float_t;
#define MICROPY_PY_ARRAY_SLICE_ASSIGN (0)
#endif
+// Whether to support attrtuple type (MicroPython extension)
+// It provides space-efficient tuples with attribute access
+#ifndef MICROPY_PY_ATTRTUPLE
+#define MICROPY_PY_ATTRTUPLE (1)
+#endif
+
// Whether to provide "collections" module
#ifndef MICROPY_PY_COLLECTIONS
#define MICROPY_PY_COLLECTIONS (1)