[issue40752] Implement PurePath.__len__

Rémi Lapeyre report at bugs.python.org
Sun May 24 05:40:27 EDT 2020


Rémi Lapeyre <remi.lapeyre at henki.fr> added the comment:

PurePath is not iterable but I would expect 

len(Path('/home/remi/src/cpython')) == 4


The fact the the path is stored as a string is an implementation detail, it seems leaky to get the length of the string here.

----------
nosy: +remi.lapeyre

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40752>
_______________________________________


More information about the Python-bugs-list mailing list