python类values()的实例源码

_collections.py 文件源码 项目:siphon-cli 作者: getsiphon 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def clear(self):
        with self.lock:
            # Copy pointers to all values, then wipe the mapping
            values = list(itervalues(self._container))
            self._container.clear()

        if self.dispose_func:
            for value in values:
                self.dispose_func(value)
_collections.py 文件源码 项目:siphon-cli 作者: getsiphon 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def getlist(self, key):
        """Returns a list of all the values for the named field. Returns an
        empty list if the key doesn't exist."""
        try:
            vals = _dict_getitem(self, key.lower())
        except KeyError:
            return []
        else:
            if isinstance(vals, tuple):
                return [vals[1]]
            else:
                return vals[1:]

    # Backwards compatibility for httplib
_collections.py 文件源码 项目:PocHunter 作者: DavexPro 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def clear(self):
        with self.lock:
            # Copy pointers to all values, then wipe the mapping
            values = list(itervalues(self._container))
            self._container.clear()

        if self.dispose_func:
            for value in values:
                self.dispose_func(value)
_collections.py 文件源码 项目:PocHunter 作者: DavexPro 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def getlist(self, key):
        """Returns a list of all the values for the named field. Returns an
        empty list if the key doesn't exist."""
        try:
            vals = _dict_getitem(self, key.lower())
        except KeyError:
            return []
        else:
            if isinstance(vals, tuple):
                return [vals[1]]
            else:
                return vals[1:]

    # Backwards compatibility for httplib
_collections.py 文件源码 项目:pelisalacarta-ce 作者: pelisalacarta-ce 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def clear(self):
        with self.lock:
            # Copy pointers to all values, then wipe the mapping
            values = list(itervalues(self._container))
            self._container.clear()

        if self.dispose_func:
            for value in values:
                self.dispose_func(value)
_collections.py 文件源码 项目:pelisalacarta-ce 作者: pelisalacarta-ce 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def getlist(self, key):
        """Returns a list of all the values for the named field. Returns an
        empty list if the key doesn't exist."""
        try:
            vals = _dict_getitem(self, key.lower())
        except KeyError:
            return []
        else:
            if isinstance(vals, tuple):
                return [vals[1]]
            else:
                return vals[1:]

    # Backwards compatibility for httplib
_collections.py 文件源码 项目:goulash-bot 作者: damdev 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def clear(self):
        with self.lock:
            # Copy pointers to all values, then wipe the mapping
            values = list(itervalues(self._container))
            self._container.clear()

        if self.dispose_func:
            for value in values:
                self.dispose_func(value)
_collections.py 文件源码 项目:goulash-bot 作者: damdev 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def getlist(self, key):
        """Returns a list of all the values for the named field. Returns an
        empty list if the key doesn't exist."""
        try:
            vals = _dict_getitem(self, key.lower())
        except KeyError:
            return []
        else:
            if isinstance(vals, tuple):
                return [vals[1]]
            else:
                return vals[1:]

    # Backwards compatibility for httplib
_collections.py 文件源码 项目:ugh 作者: shish 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def clear(self):
        with self.lock:
            # Copy pointers to all values, then wipe the mapping
            values = list(itervalues(self._container))
            self._container.clear()

        if self.dispose_func:
            for value in values:
                self.dispose_func(value)
_collections.py 文件源码 项目:ugh 作者: shish 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def getlist(self, key):
        """Returns a list of all the values for the named field. Returns an
        empty list if the key doesn't exist."""
        try:
            vals = _dict_getitem(self, key.lower())
        except KeyError:
            return []
        else:
            if isinstance(vals, tuple):
                return [vals[1]]
            else:
                return vals[1:]

    # Backwards compatibility for httplib
misc.py 文件源码 项目:Repobot 作者: Desgard 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def __delitem__(self, elem):
        'Like dict.__delitem__() but does not raise KeyError for missing values.'
        if elem in self:
            super(Counter, self).__delitem__(elem)
misc.py 文件源码 项目:Repobot 作者: Desgard 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def __len__(self):
        return len(set().union(*self.maps))     # reuses stored hash values if possible
_collections.py 文件源码 项目:kscore 作者: liuyichen 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def clear(self):
        with self.lock:
            # Copy pointers to all values, then wipe the mapping
            values = list(itervalues(self._container))
            self._container.clear()

        if self.dispose_func:
            for value in values:
                self.dispose_func(value)
_collections.py 文件源码 项目:kscore 作者: liuyichen 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def getlist(self, key):
        """Returns a list of all the values for the named field. Returns an
        empty list if the key doesn't exist."""
        try:
            vals = _dict_getitem(self, key.lower())
        except KeyError:
            return []
        else:
            if isinstance(vals, tuple):
                return [vals[1]]
            else:
                return vals[1:]

    # Backwards compatibility for httplib
_collections.py 文件源码 项目:jepsen-training-vpc 作者: bloomberg 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def clear(self):
        with self.lock:
            # Copy pointers to all values, then wipe the mapping
            values = list(itervalues(self._container))
            self._container.clear()

        if self.dispose_func:
            for value in values:
                self.dispose_func(value)
_collections.py 文件源码 项目:jepsen-training-vpc 作者: bloomberg 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def getlist(self, key):
        """Returns a list of all the values for the named field. Returns an
        empty list if the key doesn't exist."""
        try:
            vals = _dict_getitem(self, key.lower())
        except KeyError:
            return []
        else:
            if isinstance(vals, tuple):
                return [vals[1]]
            else:
                return vals[1:]

    # Backwards compatibility for httplib
_collections.py 文件源码 项目:compatify 作者: hatooku 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def clear(self):
        with self.lock:
            # Copy pointers to all values, then wipe the mapping
            values = list(itervalues(self._container))
            self._container.clear()

        if self.dispose_func:
            for value in values:
                self.dispose_func(value)
_collections.py 文件源码 项目:compatify 作者: hatooku 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def getlist(self, key):
        """Returns a list of all the values for the named field. Returns an
        empty list if the key doesn't exist."""
        try:
            vals = _dict_getitem(self, key.lower())
        except KeyError:
            return []
        else:
            if isinstance(vals, tuple):
                return [vals[1]]
            else:
                return vals[1:]

    # Backwards compatibility for httplib
_collections.py 文件源码 项目:compatify 作者: hatooku 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def clear(self):
        with self.lock:
            # Copy pointers to all values, then wipe the mapping
            values = list(itervalues(self._container))
            self._container.clear()

        if self.dispose_func:
            for value in values:
                self.dispose_func(value)
_collections.py 文件源码 项目:compatify 作者: hatooku 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def getlist(self, key):
        """Returns a list of all the values for the named field. Returns an
        empty list if the key doesn't exist."""
        try:
            vals = _dict_getitem(self, key.lower())
        except KeyError:
            return []
        else:
            if isinstance(vals, tuple):
                return [vals[1]]
            else:
                return vals[1:]

    # Backwards compatibility for httplib


问题


面经


文章

微信
公众号

扫码关注公众号