Kyle Stanley wrote: > While I'm -1 on the original proposal, I think the idea of PurePath.__len__ > returning the number of components in the path may be worth some further > consideration.
FYI PEP 428 says: In this proposal, the path classes do not derive from a builtin type. This contrasts with some other Path class proposals which were derived from str. They also do not pretend to implement the sequence protocol: if you want a path to act as a sequence, you have to lookup a dedicated attribute (the parts attribute). So while __len__() is not the whole sequence protocol, it seems like the idea was to explicitely use `len(path.parts)` instead of `len(path)` for this. _______________________________________________ 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/DOVVEVBBTX2GMEWYI3XATC2E2TFYNGW4/ Code of Conduct: http://python.org/psf/codeofconduct/