Archives Aug. 23, 2010
All those little spots where you use strings...
Written by
on
in
Snaking.
x.split( '.' )Is an idiom that shows up all over the place, particularly in list comprehensions. Run your code through 2to3 and it fails when x is a str (bytes) object, as 3.x thinks the '.' is unicode. It fails with a rather cryptic
TypeError: Type str doesn't support the buffer API
error as ...