New submission from umedoblock:

But I found a real bug to use a tuple with a comma.

Python3 recognized "abc", expression as tuple of one element.
But type() and len() recognize "abc", expression as "abc" string.
So now, I found a real bug.

I'll show you below sentences.

>>> "abc",
('abc',)
>>> obj = "abc",
>>> obj
('abc',)
>>> type(obj)
<class 'tuple'>
>>> len(("abc",))
1
>>> len(obj)
1

>>> type("abc",)
<class 'str'>
>>> len("abc",)
3

----------
components: Regular Expressions
messages: 291781
nosy: ezio.melotti, mrabarnett, umedoblock
priority: normal
severity: normal
status: open
title: type() and len() recognize "abc", expression as "abc" string.
type: behavior
versions: Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30086>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to