From: Martin Ling Date: Tue, 17 Dec 2013 16:25:13 +0000 (+0000) Subject: python: Use OrderedDict for input formats. X-Git-Tag: libsigrok-0.3.0~432 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=865730188c64765fd40fc45f28aed7fa5771550f;p=libsigrok.git python: Use OrderedDict for input formats. --- diff --git a/bindings/python/sigrok/core/classes.py b/bindings/python/sigrok/core/classes.py index 7d4ce3b7..b5a64cfc 100644 --- a/bindings/python/sigrok/core/classes.py +++ b/bindings/python/sigrok/core/classes.py @@ -19,6 +19,7 @@ from functools import partial from fractions import Fraction +from collections import OrderedDict from .lowlevel import * from . import lowlevel import itertools @@ -111,7 +112,7 @@ class Context(object): @property def input_formats(self): if not self._input_formats: - self._input_formats = {} + self._input_formats = OrderedDict() input_list = sr_input_list() for i in itertools.count(): input_ptr = sr_input_format_ptr_array_getitem(input_list, i)