[issue28244] Incorrect Example in itertools.product description

2016-09-22 Thread Raymond Hettinger

Raymond Hettinger added the comment:

The comments in the docs are necessarily terse and communicate the pattern of 
pairings.  It would not be an improvement to actually list out all the tuples.  

Sorry if this caused you any confusion, but I prefer to leave the comments as 
they are now.

--
assignee: docs@python -> rhettinger
nosy: +rhettinger
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue28244] Incorrect Example in itertools.product description

2016-09-21 Thread Matthew Ekstrand-Abueg

New submission from Matthew Ekstrand-Abueg:

Documentation states:

# product('ABCD', 'xy') --> Ax Ay Bx By Cx Cy Dx Dy
# product(range(2), repeat=3) --> 000 001 010 011 100 101 110 

But:

>>> list(itertools.product('ABCD','xy'))
[('A', 'x'), ('A', 'y'), ('B', 'x'), ('B', 'y'), ('C', 'x'), ('C', 'y'), ('D', 
'x'), ('D', 'y')]

https://docs.python.org/2/library/itertools.html#itertools.product

--
assignee: docs@python
components: Documentation
messages: 277188
nosy: Matthew Ekstrand-Abueg, docs@python
priority: normal
severity: normal
status: open
title: Incorrect Example in itertools.product description
type: behavior
versions: Python 2.7

___
Python tracker 

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