encoding problem with BeautifulSoup - problem when writing parsed text to file

Chris Angelico rosuav at gmail.com
Thu Oct 6 07:34:12 EDT 2011


On Thu, Oct 6, 2011 at 8:29 PM, Ulrich Eckhardt
<ulrich.eckhardt at dominalaser.com> wrote:
> Just wondering, why do you split the latter two parts? I would have used
> codecs.open() to open the file and define the encoding in a single step. Is
> there a downside to this approach?
>

Those two steps still happen, even if you achieve them in a single
function call. What Steven described is language- and library-
independent.

ChrisA



More information about the Python-list mailing list