Mail extraction problem (something's wrong with split methods)
Diez B. Roggisch
deetsNOSPAM at web.de
Sat Sep 11 14:11:42 EDT 2004
> Yes, I know that, but I don't understand why it works normally for lists
> under 350 bytes? It works perfectly...
That certainly has _nothing_ to do with the size of 350 - this snippet works
perfect:
len(",".join([str(i) for i in xrange(20000)]).split(','))
>> So your splitting code does not work, or your data is malformed -
>> without more information, I can't say anything about that, but it seems
>> to me the latter is the case.
>
> Data is actually not malformed, because before splitting it looks normal
> (I mean, no ' or double quotes or other strange characters). The splitting
> code is the problem, and I don't know how to fix it. I mean, if it would
> be wrong, the smaller lists wouldn't work either, but it seems the
> problems occur with big lists.
As I proved above, it has nothing to do with that. Unless you provide actual
data I can't say more. I can only guess that 350 bytes has something to do
with line-boundaries or similar stuff - you hit some sort of special case
you didn't thing of or such a thing.
Do post the data, and I'm sure things will be sorted out soon.
--
Regards,
Diez B. Roggisch
More information about the Python-list
mailing list