When I use an encoder function from codecs module, documentation says that it encodes the object input and returns a tuple (output object, length consumed).
>>> import codecs >>> enc=codecs.getencoder('iso-8859-1') >>> enc(u'asdf') ('asdf', 4) >>> I just don't understand why it returns the "length consumed". Does it means that in some case, the input string can be only partially converted ? What can be the use of the "length consumed" value ? And a last question: can I call this "enc" function from multiple threads ? -- http://mail.python.org/mailman/listinfo/python-list