[issue25261] Incorrect Return Values for any() and all() Built-in Functions

2015-09-28 Thread Sreenivasulu Saya

New submission from Sreenivasulu Saya:

The results displayed by the any() and all() is incorrect (differs from what is 
documented and what makes sense).

Here is the code:
-
multiples_of_6 = (not (i % 6) for i in range(1, 10))

print("List: ", list(multiples_of_6 ), "\nAny: ", any(multiples_of_6),
"\nAll: ", all(multiples_of_6))
---

The distribution in use is:
Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64 bit 
(AMD64)] on win32

Here is the output on Windows7:
---
List:  [False, False, False, False, False, True, False, False, False]
Any:  False<<<<< This should be True
All:  True <<<<< This should be False

--
components: Build
messages: 251816
nosy: Sreenivasulu Saya
priority: normal
severity: normal
status: open
title: Incorrect Return Values for any() and all() Built-in Functions
type: behavior
versions: Python 3.5

___
Python tracker 
<http://bugs.python.org/issue25261>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25261] Incorrect Return Values for any() and all() Built-in Functions

2015-09-29 Thread Sreenivasulu Saya

Sreenivasulu Saya added the comment:

Thanks Steven and Tim for the comments. Today, I learnt something about Python.

--

___
Python tracker 
<http://bugs.python.org/issue25261>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com