[issue27234] tuple - single value with comma is assigned as type tuple
Arno-Can Uestuensoez
report at bugs.python.org
Sun Jun 5 13:06:46 EDT 2016
New submission from Arno-Can Uestuensoez:
A single value terminated by a comma is assigned to be a tuple, even when missing parenthesis.
a=(1) => a=1 OK/defined as
a=(1,) => a=(1,) OK
a=1, => a=(1,) ???
Is the latter intended?
------------------
In [4]: a=1,
In [5]: print a
(1,)
In [6]: type(a)
Out[6]: tuple
-------------------
----------
components: Interpreter Core
messages: 267434
nosy: acue
priority: normal
severity: normal
status: open
title: tuple - single value with comma is assigned as type tuple
type: behavior
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27234>
_______________________________________
More information about the Python-bugs-list
mailing list