On 24May2020 13:46, M.-A. Lemburg <m...@egenix.com> wrote:
It would be surprising to have an object which implements .__len__(),
but otherwise doesn't allow any indexing, so -1 on such a change.

set() ? I personally don't have a fundamental problem with something having a size but no indexing.

If Paths ever get indexing, it would also be more natural to
have those indexes refer to path components.

Aye, I think the same.

The .__len__()
would have to map to the number of path components, not the length
of a string representation.

Yes, it would be confusing for len() to measure something different to that measured by a numeric index.

I think this makes me -1 on the proposal, also because str(Path) is so easy to do.

Cheers,
Cameron Simpson <c...@cskk.id.au>
_______________________________________________
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/QF7BARPGW2CVDBM4VKIVFAZB6X7TRFW6/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to