This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Don't need delineators on lists
Type: resource usage Stage: resolved
Components: Documentation Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: 345trig, Dennis Sweeney, barry, docs@python
Priority: normal Keywords:

Created on 2022-01-09 21:05 by 345trig, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (4)
msg410169 - (view) Author: Devin Harper (345trig) Date: 2022-01-09 21:05
a=1
b=2
c=3
list=a, b, c
#Remove spaces at the end of lists. Because sometimes spaces are errors or not depending on the number of items in your list. Remove list delineators to save a little memory and time not typing those delineator symbols on list definitions.
for items in list:
    print(items)
msg410170 - (view) Author: Dennis Sweeney (Dennis Sweeney) * (Python committer) Date: 2022-01-09 21:11
What you typed is already valid syntax, it's just that `a, b, c` makes a tuple, not a list. Changing that now would be backwards-incompatible.

Is this a request for some kind of tweak to some documentation, or is this a request for a different behavior?
msg410171 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2022-01-09 21:44
As Dennis points out, this is not a bug, it's already valid Python syntax.
msg410176 - (view) Author: Devin Harper (345trig) Date: 2022-01-09 23:09
Had to look up tuple in documentation instead of list. Thanks for mentioning tuple!
History
Date User Action Args
2022-04-11 14:59:54adminsetgithub: 90479
2022-01-09 23:09:58345trigsetstatus: open -> closed

messages: + msg410176
stage: resolved
2022-01-09 21:44:44barrysetstatus: pending -> open

nosy: + barry
messages: + msg410171

resolution: not a bug
2022-01-09 21:11:45Dennis Sweeneysetstatus: open -> pending
nosy: + Dennis Sweeney
messages: + msg410170

2022-01-09 21:05:30345trigcreate