Brett Cannon <br...@python.org> added the comment:
The inconsistency is a bit weird. Looking at https://github.com/python/cpython/blob/master/Lib/pathlib.py#L825 the question is why is self.name not being set for '.' but it is for '..'. I suspect there's special-casing for '.' somewhere that sets self.name to '' for '.' but leaves it alone in all other instances. Based on what with_name() is supposed to do I would argue that '..' shouldn't work since without a filename the with_name() method makes no sense. ---------- nosy: +brett.cannon _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37130> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com