Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'bug': 0.02; 'raises': 0.07; 'stuff,': 0.07; 'variable,': 0.07; 'bug?': 0.09; 'reply- to:addr:comp.lang.python': 0.09; 'reports.': 0.09; 'to:addr:comp.lang.python': 0.09; 'valueerror:': 0.09; 'subject:error': 0.09; '"...': 0.16; '"expected': 0.16; '14",': 0.16; 'saying,': 0.16; 'unpack': 0.16; 'very,': 0.16; 'cc:addr :python-list': 0.16; 'cc:no real name:2**0': 0.20; 'long,': 0.21; 'header:In-Reply-To:1': 0.22; 'cc:2**0': 0.24; 'function': 0.27; 'variable': 0.28; 'explicit': 0.29; 'cc:addr:python.org': 0.29; 'error': 0.29; 'values': 0.32; 'returning': 0.32; 'header:User- Agent:1': 0.33; 'received:209.85.212': 0.34; 'too': 0.34; 'things': 0.34; 'supposed': 0.35; 'but': 0.37; 'list,': 0.37; 'received:google.com': 0.37; 'received:209.85': 0.38; 'possible.': 0.39; 'should': 0.39; "it's": 0.40; 'received:209': 0.40; 'more': 0.61; 'happen': 0.61; 'subject:day': 0.68; 'header:Reply-To:1': 0.71; 'reply-to:no real name:2**0': 0.72; 'reply- to:addr:googlegroups.com': 0.74; 'observed': 0.84; 'received:209.85.212.56': 0.91; 'received:mail- vw0-f56.google.com': 0.91 Newsgroups: comp.lang.python Date: Thu, 8 Dec 2011 10:42:45 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.114.87.114; posting-account=dAOV_goAAABEUkqpkMcBZ68KkIzfCnsO References: <18647617.2258.1323358966076.JavaMail.geo-discussion-forums@yqf20> User-Agent: G2/1.0 X-Google-Web-Client: true MIME-Version: 1.0 Subject: Re: Misleading error message of the day From: Roy Smith To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: comp.lang.python@googlegroups.com List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1323369773 news.xs4all.nl 6882 [2001:888:2000:d::a6]:59128 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:16859 (some, very, long, list, of, variable, names, to, get, the, stuff, unpacked, into) = function_that_should_return_a_14_tuple() raises ValueError: too many values to unpack Quick, what's the bug? Did I forget a variable on the LHS, or is my function returning more things than it should? I know it's supposed to be 14, but I don't know which side is wrong. Had it said "... expected 13, got 14", I would know immediately. Error messages should be as explicit as possible. It's just like bug reports. The basic mantra of a bug report is: 1) This is what I did 2) This is what I expected to happen 3) This is what I observed happen 4) This is how what I observed differed from what I expected Saying, "expected X, got Y" is more explicit than "got too many"