コード例 #1
0
ファイル: commons.py プロジェクト: anitameh/astroquery
    def __init__(self, inp):
        if not isinstance(inp, OrderedDict):
            try:
                inp = OrderedDict(inp)
            except (TypeError,ValueError):
                raise ValueError("Input to TableList must be an OrderedDict or list of (k,v) pairs")

        self._dict = inp
        super(TableList,self).__init__(inp.values())
コード例 #2
0
ファイル: commons.py プロジェクト: hamogu/astroquery
    def __init__(self, inp):
        if not isinstance(inp, OrderedDict):
            try:
                inp = OrderedDict(inp)
            except (TypeError, ValueError):
                raise ValueError("Input to TableList must be an OrderedDict "
                                 "or list of (k,v) pairs")

        self._dict = inp
        super(TableList, self).__init__(inp.values())
コード例 #3
0
ファイル: commons.py プロジェクト: jfoster17/astroquery
    def __init__(self, inp):
        if not isinstance(inp, OrderedDict):
            # py3 doesn't let you catch 2 types of errors.
            errmsg = "Input to TableList must be an OrderedDict or list of (k,v) pairs"
            try:
                inp = OrderedDict(inp)
            except (TypeError, ValueError):
                raise ValueError("Input to TableList must be an OrderedDict or list of (k,v) pairs")

        self._dict = inp
        super(TableList, self).__init__(inp.values())
コード例 #4
0
ファイル: commons.py プロジェクト: derdon/astroquery
    def __init__(self, inp):
        if not isinstance(inp, OrderedDict):
            # py3 doesn't let you catch 2 types of errors.
            errmsg = "Input to TableList must be an OrderedDict or list of (k,v) pairs"
            try:
                inp = OrderedDict(inp)
            except (TypeError, ValueError):
                raise ValueError("Input to TableList must be an OrderedDict or list of (k,v) pairs")

        self._dict = inp
        super(TableList, self).__init__(inp.values())