[Python-Dev] With statement
Duncan Booth
duncan@rcp.co.uk
Tue, 04 Feb 2003 17:19:39 -0000
On 4 Feb 2003 at 17:02, Moore, Paul wrote:
> # You do realise you can't use a raw file object here really?
Unless of course the file object sprouted an __exit__ method.
It's probably worth including the pro's and con's of that in
your PEP.
I can see people falling into the trap of expecting the file
object to 'do the obvious thing' here (Neal Norwitz being the
first, but almost certainly not the last).
--
Duncan Booth
duncan@dales.rmplc.co.uk
int month(char *p){return(124864/((p[0]+p[1]-
p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?
http://dales.rmplc.co.uk/Duncan