[New-bugs-announce] [issue23949] Number of elements display in error message is wrong while unpacking in traceback

Ulaga Nathan Mahadevan report at bugs.python.org
Tue Apr 14 18:28:57 CEST 2015


New submission from Ulaga Nathan Mahadevan:

data = ['David',50,91.1,(2012,12,21)]
print ("Data = ",data)
name,shares,price,date,value = data

print("Name = ",name, ", no of shares = ",shares,", unit price = ",price,", date of purchase = ",date)

After running the script
Data =  ['David', 50, 91.1, (2012, 12, 21)]
    name,shares,price,date,value = data
ValueError: need more than 4 values to unpack

There are only 4 values to unback and "not more than 4". The given number of elements are 4 and so required number is 4. The error message is not clear or confusing.

----------
messages: 240935
nosy: ulaganathanm123 at gmail.com
priority: normal
severity: normal
status: open
title: Number of elements display in error message is wrong while unpacking in traceback
type: enhancement
versions: Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23949>
_______________________________________


More information about the New-bugs-announce mailing list