lxml/lxml — pull request #72 by canaaerus (2012-10-15 19:42:53+00:00)
Title: Allow bytes as input to lxml.html.fromstring, thereby fixing issue #33.

The new code in `fromstring` now uses appropriate arguments to `startswith` depending on whether a `bytes` object was given as input or not. I also added a test case, that gives utf-8 encoded data and provides the encoding via the `parser` argument.

I only tried out the test case with python 2.7 and 3.2. Hopefully earlier versions do, like I read, simply ignore the `b` in front of literal strings. The output at the end will also differ from the actual output in python3 by the missing `b` in front. But as far as I have seen, this also happens in `selftest.py`.