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.
Created on 2012年08月23日 08:27 by zhuojun, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg168929 - (view) | Author: zhuojun (zhuojun) | Date: 2012年08月23日 08:27 | |
>>> def f(*agrs): print(agrs) >>> f(1,2) (1, 2) >>> f(1) #Is the output wrong? It should be without ','. (1,) |
|||
| msg168930 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2012年08月23日 08:30 | |
Tuples with one element are defined as (x,), since the comma is what really makes the tuple. |
|||
| msg168931 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2012年08月23日 08:33 | |
See the second code block here: http://docs.python.org/py3k/tutorial/datastructures.html#tuples-and-sequences |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:35 | admin | set | github: 59975 |
| 2012年08月23日 08:33:11 | ezio.melotti | set | messages: + msg168931 |
| 2012年08月23日 08:30:37 | ezio.melotti | set | status: open -> closed assignee: ezio.melotti nosy: + ezio.melotti messages: + msg168930 resolution: not a bug stage: resolved |
| 2012年08月23日 08:27:22 | zhuojun | create | |