pathlib.py 文件源码

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

项目:click-configfile 作者: jenisys 项目源码 文件源码
def absolute(self):
        """Return an absolute version of this path.  This function works
        even if the path doesn't point to anything.

        No normalization is done, i.e. all '.' and '..' will be kept along.
        Use resolve() to get the canonical path to a file.
        """
        # XXX untested yet!
        if self.is_absolute():
            return self
        # FIXME this must defer to the specific flavour (and, under Windows,
        # use nt._getfullpathname())
        obj = self._from_parts([os.getcwd()] + self._parts, init=False)
        obj._init(template=self)
        return obj
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号