New submission from zhuojun:
def f(*agrs):
print(agrs)
f(1,2)
(1, 2)
f(1) #Is the output wrong? It should be without ','.
(1,)
--
components: None
messages: 168929
nosy: zhuojun
priority: normal
severity: normal
status: open
title: Tunple Bug?
type: behavior
versions: Python
Ezio Melotti added the comment:
Tuples with one element are defined as (x,), since the comma is what really
makes the tuple.
--
assignee: - ezio.melotti
nosy: +ezio.melotti
resolution: - invalid
stage: - committed/rejected
status: open - closed
Ezio Melotti added the comment:
See the second code block here:
http://docs.python.org/py3k/tutorial/datastructures.html#tuples-and-sequences
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15771