"So I implemented `PurePath.__len__` as `str(len(path))`." Sure you meant
len(str(path)), right?

"Serhiy and Remi objected, because it might not be obvious that the length
of the path would be the length of string." I find this _really_
unintuitive. If anything, I would expect len(p) to be the "depth" of the
path, which doesn't make a lot of sense if it is not an absolute path.

It is a -1 from me because, besides what I outlined above, if you need the
length of the string representation, len(str(p)) is quite short and obvious
already.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/UU5I46IHXHNSQNCET6XPPPVZD5IN634D/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to