From 4a1cad522751f5f3081fa205032a35d9d64a8c09 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 29 Sep 2014 17:28:14 +0800 Subject: [PATCH] language/core: reduce namespace pollution --- artiq/language/core.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/artiq/language/core.py b/artiq/language/core.py index 79ab87a89..05755a1fb 100644 --- a/artiq/language/core.py +++ b/artiq/language/core.py @@ -1,7 +1,7 @@ """Core ARTIQ extensions to the Python language.""" -from collections import namedtuple -from copy import copy +from collections import namedtuple as _namedtuple +from copy import copy as _copy class int64(int): @@ -77,7 +77,7 @@ def array(element, count): Arrays of arrays are supported. """ - return [copy(element) for i in range(count)] + return [_copy(element) for i in range(count)] class AutoContext: @@ -179,7 +179,7 @@ class AutoContext: pass -_KernelFunctionInfo = namedtuple("_KernelFunctionInfo", "core_name k_function") +_KernelFunctionInfo = _namedtuple("_KernelFunctionInfo", "core_name k_function") def kernel(arg):