Message 146005 - Python tracker (original) (raw)
page.encoding is a good idea.
page.decode_content sounds definitely better than page.decode which can be confusing as page is not a bytes object, but a file-like object.
I am thinking if an attribute to urlopen would be better? Not exactly the mode like attribute of the builtin open, but something like decoded=False
The downside is that the attr is now for the implementation detail of the method in py3k and upside is it gives an idea to users as what return value they can/should expect.