struct.unpack

Peter Otten __peter__ at web.de
Sun Oct 2 18:31:44 EDT 2005


g.franzkowiak wrote:

> tmpList = list(dataObject)[:4])
> obj     = tmpList[0]+tmpList[1]+tmpList[2]+tmpList[3].

Have you tried just

obj = dataObject[:4]

without the intermediate list? If that failed, can you tell us the type of
the dataObject? E. g.

>>> print type(dataObject)
<class '__main__.NeitherListNorString'>

Peter




More information about the Python-list mailing list