[issue1283110] Give __len__() advice for "don't know"

2022-01-09 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> out of date stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue1283110] Give __len__() advice for "don't know"

2021-03-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: Looking at the patch years later, I'm thinking that this isn't needed or helpful. Not needed because users haven't reported any misunderstandings in the interim. Not helpful because the text looks forbidding and impenetrable, too much for a simple

[issue1283110] Give __len__() advice for "don't know"

2021-03-14 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +easy versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___

[issue1283110] Give __len__() advice for "don't know"

2017-03-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +needs review stage: -> patch review status: pending -> open versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.4 ___ Python tracker

[issue1283110] Give __len__() advice for "don't know"

2016-04-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___ ___

[issue1283110] Give __len__() advice for don't know

2012-10-19 Thread Todd Rovito
Changes by Todd Rovito rovit...@gmail.com: Removed file: http://bugs.python.org/file27605/DataModel__len__.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1283110 ___

[issue1283110] Give __len__() advice for don't know

2012-10-19 Thread Todd Rovito
Todd Rovito added the comment: Changed the file name so it is clear that this patch goes with version 3.4. -- Added file: http://bugs.python.org/file27624/RightClickContextMenuUpdatedFor3point4.patch ___ Python tracker rep...@bugs.python.org

[issue1283110] Give __len__() advice for don't know

2012-10-19 Thread Todd Rovito
Changes by Todd Rovito rovit...@gmail.com: Removed file: http://bugs.python.org/file27624/RightClickContextMenuUpdatedFor3point4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1283110 ___

[issue1283110] Give __len__() advice for don't know

2012-10-19 Thread Todd Rovito
Todd Rovito added the comment: Used the right patch file name this time... -- Added file: http://bugs.python.org/file27625/DataModel__len__3point4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1283110

[issue1283110] Give __len__() advice for don't know

2012-10-19 Thread Todd Rovito
Todd Rovito added the comment: This patch is for Python 2.7. -- versions: +Python 2.7 Added file: http://bugs.python.org/file27626/DataModel__len__2point7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1283110

[issue1283110] Give __len__() advice for don't know

2012-10-17 Thread Todd Rovito
Changes by Todd Rovito rovit...@gmail.com: Removed file: http://bugs.python.org/file27589/DataModel__len__.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1283110 ___

[issue1283110] Give __len__() advice for don't know

2012-10-17 Thread Todd Rovito
Todd Rovito added the comment: New patch with a better reference to the source for the test case. This was suggested by PythonMentors list. I think the patch improves the documentation. This works on Python 3.4. -- Added file: http://bugs.python.org/file27605/DataModel__len__.patch

[issue1283110] Give __len__() advice for don't know

2012-10-15 Thread Todd Rovito
Todd Rovito added the comment: For Python 3.4 attached is a patch as suggested by Raymond Hettinger. My suggestion is to put the patch in Doc/reference/datamodel.rst because if a user searches google.com for __len__ this is the first link in the list. I think this extra information is a

[issue1283110] Give __len__() advice for don't know

2010-08-21 Thread Mark Lawrence
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- assignee: georg.brandl - d...@python nosy: +d...@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1283110 ___

[issue1283110] Give __len__() advice for don't know

2009-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: If iterators don't want their boolean value to be messed up, couldn't they simply use __bool__ for that? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1283110

[issue1283110] Give __len__() advice for don't know

2009-02-17 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: On Tue, Feb 17, 2009 at 1:27 PM, Antoine Pitrou rep...@bugs.python.org wrote: Antoine Pitrou pit...@free.fr added the comment: If iterators don't want their boolean value to be messed up, couldn't they simply use __bool__ for that?

[issue1283110] Give __len__() advice for don't know

2009-02-17 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Where would you prefer adding this documentation? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1283110 ___

[issue1283110] Give __len__() advice for don't know

2009-02-16 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: I believe this bug is out of date with the advent of __length_hint__. -- nosy: +benjamin.peterson resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org

[issue1283110] Give __len__() advice for don't know

2009-02-16 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: It should still be documented that __len__ can be used for this purpose. The __length_hint__ attribute is mainly for iterators because they are not allowed to have a __len__ as that would affect their boolean value.