Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #5016 > unrolled thread
| Started by | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| First post | 2011-05-09 13:51 -0600 |
| Last post | 2011-05-09 13:51 -0600 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Inconsistency with split() - Script, OS, or Package Problem? Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-09 13:51 -0600
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2011-05-09 13:51 -0600 |
| Subject | Re: Inconsistency with split() - Script, OS, or Package Problem? |
| Message-ID | <mailman.1348.1304970693.9059.python-list@python.org> |
On Mon, May 9, 2011 at 1:29 PM, James Wright <jamfwright@gmail.com> wrote:
> It does not appear to show a key:
>
> D4[] = vsr
> Traceback (most recent call last):
> File "render4.py", line 115, in <module>
> create_report_index(each_item)
> File "render4.py", line 26, in create_report_index
> [clean_name, _] = each_value.split('_', 1)
> ValueError: need more than 1 value to unpack
The key appears to be the empty string. You can confirm that by
changing the %s to %r in Ethan's diagnostic. That will print out the
repr() of the value, which should make it more clear what the value
actually is.
Back to top | Article view | comp.lang.python
csiph-web