From 5aa311d33084c24262780cae0a65d748990ce7e1 Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 21 Apr 2015 14:14:24 +0000 Subject: 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. --- py/mpconfig.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'py/mpconfig.h') 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) -- cgit v1.2.3