Please help with problem creating class

Aahz aahz at pythoncraft.com
Sat Apr 18 22:05:21 CEST 2009


In article <3pmpb6-lq9.ln1 at spamfence.net>,
=?UTF-8?Q?G=C3=BCnther?= Dietrich <guenther.dietrich at spamfence.net> wrote:
>
>You assign the result of line.split() to four variables. So split needs 
>at least four fields (that's more than three) in line to process.

s/at least/exactly/

>>> w, x, y, z = '1\t2\t3\t4\t5'.split('\t')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ValueError: too many values to unpack
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"If you think it's expensive to hire a professional to do the job, wait
until you hire an amateur."  --Red Adair



More information about the Python-list mailing list