コード例 #1
0
ファイル: __init__.py プロジェクト: AlexHorlenko/ironpython3
    def __init__(self, *args, **kwds):
        '''Initialize an ordered dictionary.  The signature is the same as
        regular dictionaries, but keyword arguments are not recommended because
        their insertion order is arbitrary.

        '''
        if len(args) > 1:
            raise TypeError('expected at most 1 arguments, got %d' % len(args))
        try:
            self.__root
        except AttributeError:
            self.__hardroot = _Link()
            self.__root = root = _proxy(self.__hardroot)
            root.prev = root.next = root
            self.__map = {}
        self.__update(*args, **kwds)
コード例 #2
0
ファイル: __init__.py プロジェクト: gongminmin/cpython
 def __init__(*args, **kwds):
     '''Initialize an ordered dictionary.  The signature is the same as
     regular dictionaries.  Keyword argument order is preserved.
     '''
     if not args:
         raise TypeError("descriptor '__init__' of 'OrderedDict' object "
                         "needs an argument")
     self, *args = args
     if len(args) > 1:
         raise TypeError('expected at most 1 arguments, got %d' % len(args))
     try:
         self.__root
     except AttributeError:
         self.__hardroot = _Link()
         self.__root = root = _proxy(self.__hardroot)
         root.prev = root.next = root
         self.__map = {}
     self.__update(*args, **kwds)
コード例 #3
0
ファイル: __init__.py プロジェクト: ClayMason/BlackrockFBP
    def __init__(*args, **kwds):
        """Initialize an ordered dictionary.  The signature is the same as
        regular dictionaries, but keyword arguments are not recommended because
        their insertion order is arbitrary.

        """
        if not args:
            raise TypeError("descriptor '__init__' of 'OrderedDict' object " "needs an argument")
        self, *args = args
        if len(args) > 1:
            raise TypeError("expected at most 1 arguments, got %d" % len(args))
        try:
            self.__root
        except AttributeError:
            self.__hardroot = _Link()
            self.__root = root = _proxy(self.__hardroot)
            root.prev = root.next = root
            self.__map = {}
        self.__update(*args, **kwds)
コード例 #4
0
ファイル: __init__.py プロジェクト: Caick1000/urlBot
    def __init__(*args, **kwds):
        '''Initialize an ordered dictionary.  The signature is the same as
        regular dictionaries, but keyword arguments are not recommended because
        their insertion order is arbitrary.

        '''
        if not args:
            raise TypeError("descriptor '__init__' of 'OrderedDict' object "
                            "needs an argument")
        self, *args = args
        if len(args) > 1:
            raise TypeError('expected at most 1 arguments, got %d' % len(args))
        try:
            self.__root
        except AttributeError:
            self.__hardroot = _Link()
            self.__root = root = _proxy(self.__hardroot)
            root.prev = root.next = root
            self.__map = {}
        self.__update(*args, **kwds)