mozilla-services/shavar

Incorrect usage of str.split()

Closed this issue · 1 comments

The codebase contains statements like the following:

lname, chunklist = line.split(";", 2)

This particular example can be found here. Whoever wrote this seems to think that the second parameter to str.split() indicates the number of resulting string parts, like in JavaScript. However, in Python it's the maximum number of splits, so it should be line.split(";", 1).

Lots of instances. Fixed.