[issue32109] Separated square brackets will generate a tuple instead of a list.

2017-11-22 Thread YCmove

YCmove  added the comment:

Yes, what Cheryl Sabella says is what I was misled to. 

Took me a while to understand that ``[a]``, ``[a, b, c]`` is not ``[a], [a, b, 
c]``, how about replace comma to "or" for more clarity? just like it used in 
[tuple 
documention](https://github.com/python/cpython/blob/master/Doc/library/stdtypes.rst#tuples)

Here is my rephrased version, and I add one more example of comma separated 
lists in tuple according to R. David Murray.

--
hgrepos: +374

___
Python tracker 

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



[issue32109] Separated square brackets will generate a tuple instead of a list.

2017-11-22 Thread R. David Murray

R. David Murray  added the comment:

Yes, the markup (and therefore how the code is displayed in the docs) clearly 
indicates that the , between the lists is not part of the python syntax being 
discussed.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue32109] Separated square brackets will generate a tuple instead of a list.

2017-11-22 Thread Berker Peksag

Berker Peksag  added the comment:

That's why I mentioned ``[a], [a, b, c]`` in my earlier message.

--

___
Python tracker 

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



[issue32109] Separated square brackets will generate a tuple instead of a list.

2017-11-22 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Perhaps this is what the YCMove meant?

>>> a = [1], [2, 3, 4]
>>> a
([1], [2, 3, 4])
>>>

--
nosy: +csabella

___
Python tracker 

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



[issue32109] Separated square brackets will generate a tuple instead of a list.

2017-11-21 Thread Berker Peksag

New submission from Berker Peksag :

Thank you for your report and for the PR, but I think you misunderstood 
documentation:

Using square brackets, separating items with commas: [a], [a, b, c]

The comma is used to show two different lists: a list with one item ``[a]`` 
*and* a list with three items ``[a, b, c]``, not a tuple with two lists ``[a], 
[a, b, c]`` (In Python, both ``(1,)`` and ``1,`` create a tuple)

--
nosy: +berker.peksag
resolution:  -> not a bug
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue32109] Separated square brackets will generate a tuple instead of a list.

2017-11-21 Thread YCmove

Change by YCmove :


--
keywords: +patch
pull_requests: +4435
stage:  -> patch review

___
Python tracker 

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



[issue32109] Separated square brackets will generate a tuple instead of a list.

2017-11-21 Thread YCmove

Change by YCmove :


--
assignee: docs@python
components: Documentation
nosy: YCmove, docs@python
priority: normal
severity: normal
status: open
title: Separated square brackets will generate a tuple instead of a list.
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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