On 25.05.2020 03:34, Cameron Simpson wrote: > 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.
Good point. Thinking about it, my intuition wasn't fully correct: there are certainly container object types which do have a size, but don't allow direct position based access to their elements, e.g. ones which only allow iteration. Cheers, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, May 25 2020) >>> Python Projects, Coaching and Support ... https://www.egenix.com/ >>> Python Product Development ... https://consulting.egenix.com/ ________________________________________________________________________ ::: We implement business ideas - efficiently in both time and costs ::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 https://www.egenix.com/company/contact/ https://www.malemburg.com/ _______________________________________________ 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/6B2M7U2CPVJ5WUECA37MTVKHQKNNX2SB/ Code of Conduct: http://python.org/psf/codeofconduct/