__init__.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:jgscm 作者: src-d 项目源码 文件源码
def _get_blob_name(blob):
        """
        Gets blob name (last part of the path).
        :param blob: instance of :class:`google.cloud.storage.Blob`.
        :return: name string.
        """
        if isinstance(blob, Blob):
            return url_unescape(blob.path).rsplit("/", 1)[-1]
        assert isinstance(blob, (unicode, str))
        if blob.endswith("/"):
            blob = blob[:-1]
        return blob.rsplit("/", 1)[-1]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号