[issue39816] More descriptive error message than "too many values to unpack"

2021-09-02 Thread Dávid Nemeskey
Dávid Nemeskey added the comment: +1. When starting out, I always got confused about this message ("too many values to unpack? Does that mean my function returned too many items, which could not be unpacked into the expected number? Oh no, the opposite..."). Also, please note that the stack

[issue39816] More descriptive error message than "too many values to unpack"

2021-05-25 Thread malcomvx
malcomvx added the comment: Python functions can return multiple variables . These variables can be stored in variables directly. This is a unique property of Python , other programming languages such as C++ or Java do not support this by default. The valueerror: too many values to unpack

[issue39816] More descriptive error message than "too many values to unpack"

2020-03-16 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch nosy: +ZackerySpytz nosy_count: 4.0 -> 5.0 pull_requests: +18387 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19036 ___ Python tracker

[issue39816] More descriptive error message than "too many values to unpack"

2020-03-01 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39816] More descriptive error message than "too many values to unpack"

2020-03-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Chris and Kyle. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue39816] More descriptive error message than "too many values to unpack"

2020-03-01 Thread Kyle Stanley
Kyle Stanley added the comment: +1, I've always found the "too many values to unpack" error messages be rather vague. Adding the type should make the message more clear, and easier to debug the error for users. But, I think Chris Angelico raised a good point regarding the length (in the

[issue39816] More descriptive error message than "too many values to unpack"

2020-03-01 Thread Alex Hall
New submission from Alex Hall : Based on the discussion in https://mail.python.org/archives/list/python-id...@python.org/thread/C6QEAEEAELUHMLB23OBRSQK2UYU3AF5O/ When unpacking fails with an error such as: ValueError: too many values to unpack (expected 2) the name of the type of the