Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #33004
| From | Helmut Jarausch <jarausch@igpm.rwth-aachen.de> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Python3.3 str() bug? |
| Date | 2012-11-09 09:18 +0000 |
| Message-ID | <ag402kFkb9hU1@mid.dfncis.de> (permalink) |
Hi,
probably I'm missing something.
Using str(Arg) works just fine if Arg is a list.
But
str([],encoding='latin-1')
gives the error
TypeError: coercing to str: need bytes, bytearray or buffer-like object,
list found
If this isn't a bug how can I use str(Arg,encoding='latin-1') in general.
Do I need to flatten any data structure which is normally excepted by str() ?
Many thanks for a hint,
Helmut.
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Python3.3 str() bug? Helmut Jarausch <jarausch@igpm.rwth-aachen.de> - 2012-11-09 09:18 +0000
Re: Python3.3 str() bug? Stefan Behnel <stefan_ml@behnel.de> - 2012-11-09 10:37 +0100
Re: Python3.3 str() bug? Helmut Jarausch <jarausch@igpm.rwth-aachen.de> - 2012-11-09 11:08 +0000
Re: Python3.3 str() bug? Chris Angelico <rosuav@gmail.com> - 2012-11-09 23:22 +1100
Re: Python3.3 str() bug? Helmut Jarausch <jarausch@igpm.rwth-aachen.de> - 2012-11-09 13:13 +0000
Re: Python3.3 str() bug? Stefan Behnel <stefan_ml@behnel.de> - 2012-11-09 18:07 +0100
Re: Python3.3 str() bug? Terry Reedy <tjreedy@udel.edu> - 2012-11-09 18:35 -0500
RE: Python3.3 str() bug? "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-11-09 17:47 +0000
Re: Python3.3 str() bug? Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2012-11-10 16:45 +0000
Re: Python3.3 str() bug? Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-09 10:25 -0700
csiph-web