summaryrefslogtreecommitdiffstatshomepage
path: root/tests/bench/var-8.1-namedtuple-5th.py
diff options
context:
space:
mode:
authorstijn <stinos@zoho.com>2014-12-20 16:37:40 +0100
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-01-01 14:53:23 +0200
commit12340147b0ace7c1feeaf36b618c92652bdb849f (patch)
tree7bb43cac6b4c46f27607e5ac7a1dabfaf5db31c1 /tests/bench/var-8.1-namedtuple-5th.py
parent8422cac0888ed9694ec84f3bac8d6edc3d39e911 (diff)
downloadmicropython-12340147b0ace7c1feeaf36b618c92652bdb849f.tar.gz
micropython-12340147b0ace7c1feeaf36b618c92652bdb849f.zip
py: Use sequence of strings for named tuple initialization
- remove single string initialization style - take list of strings instead - store list in the type for fast lookup
Diffstat (limited to 'tests/bench/var-8.1-namedtuple-5th.py')
-rw-r--r--tests/bench/var-8.1-namedtuple-5th.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/bench/var-8.1-namedtuple-5th.py b/tests/bench/var-8.1-namedtuple-5th.py
index 2cd6d15a0d..b6bdc8d795 100644
--- a/tests/bench/var-8.1-namedtuple-5th.py
+++ b/tests/bench/var-8.1-namedtuple-5th.py
@@ -1,7 +1,7 @@
import bench
from _collections import namedtuple
-T = namedtuple("Tup", "foo1 foo2 foo3 foo4 num")
+T = namedtuple("Tup", ["foo1", "foo2", "foo3", "foo4", "num"])
def test(num):
t = T(0, 0, 0, 0, 20000000)