As Barn said, this is apparently a redundant import, and RoeeeK is also right in saying that most of the functions of the string module are in the meantime string methods, i.e. you can do "foobar".method() instead of string.function("foobar") . However, sometimes it is still useful to explicitly import the module; for example in case of callbacks:
map(string.strip, [' foo ', ' bar ']) .
Note that the above can also be achieved with [chunk.strip() for chunk in [' foo ', ' bar ']] , so importing a string is not really required in this case.
jena source share