Paul Prescod wrote: > > "M.-A. Lemburg" wrote: > > > > ... > > > > I'd say +0, since the auto-converion can fail if the default > > encoding doesn't have room for the tagName characters. > > > > Either way, I'd still prefer the DOM code to use an explicit > > .encode() together with some lossless encoding, e.g. > > unicode-escape. > > If we want to use a hard-coded lossless encoding, we should do so in > repr. Rather than having us fix a dozen modules with problems like this, > we should fix repr once and for all. I think it's ok to auto-convert to the default encoding as intermediate solution, but the applications wanting to return Unicode as __repr__ or __str__ should really use .encode() to make sure the output that is produces matches their (or their user's) expectations. -- Marc-Andre Lemburg ______________________________________________________________________ Business: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4