[New-bugs-announce] [issue42118] TypeError gives wrong reserved name

Jason Schwefel report at bugs.python.org
Thu Oct 22 11:38:20 EDT 2020


New submission from Jason Schwefel <jason.schwefel78 at gmail.com>:

The following code gives a "TypeError: 'str' object is not callable" exception:

int = ''
s = '3500:day'
a = s.split(':')
i = int(a[0])

Proper exception message should be "TypeError: 'int' object is not callable" 

Only able to test on 3.8 and 3.9

----------
components: Interpreter Core
messages: 379300
nosy: jason.schwefel78
priority: normal
severity: normal
status: open
title: TypeError gives wrong reserved name
type: behavior
versions: Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42118>
_______________________________________


More information about the New-bugs-announce mailing list