[issue35175] Builtin function all() is handling dict() types in a weird way.

2018-11-06 Thread Josh Rosenberg
Change by Josh Rosenberg : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue35175] Builtin function all() is handling dict() types in a weird way.

2018-11-06 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Dictionary iterates over keys and this is expected behavior. If you need to iterate by values you should use dict().values() $ python3 -c 'for i in dict(a=1): print(i)' a $ python3 -c 'print(all(dict(a=False)))' # Iterate by keys and thus 'a' is

[issue35175] Builtin function all() is handling dict() types in a weird way.

2018-11-06 Thread Daniel Stoinov
New submission from Daniel Stoinov : When a dictionary is passed to all() function, it iterates the keys instead of the values. -- files: all-dict-example.py messages: 329354 nosy: stnv priority: normal severity: normal status: open title: Builtin function all() is handling dict()