RE: [bch-discuss] Python 2.0
Status: Alpha
Brought to you by:
mwh
From: Michael H. <mw...@ca...> - 2000-10-06 12:11:59
|
On Fri, 6 Oct 2000, Toby Dickenson wrote: > > > (If anyones interested, Ive been experimenting with > > allowing file-like > > > objects to choose their own character encoding when a unicode string > > > is printed) > > > > Cool. How does bytecodehacks help, out of curiosity? > > The regular print converts stuff using str() - which will raise an exception > in a unicode object that contains non-ascii characters. > > Python 2.0 adds two new instructions in support of the new sytax that lets > you > specify the file to which stuff gets printed (print >> file, stuff). Im > converting > those instructions into method calls into the file object. [snip] Very nice. I've checked in your changes, plus a few things I'd been working on intermittently over the last few months. It passes the tests, but I'd appreciate it if you could give it a spin! Cheers, M. PS: Do you have a sourceforge ID? (Careful - if you tell me you're likely to get added as a developer...). |