Re: with statement and standard library

2010-02-21 Thread Chris Rebert
On Sun, Feb 21, 2010 at 3:21 PM, John Nagle wrote: > nobrowser wrote: >> >> Hi.  The with statement is certainly nifty.  The trouble is, the >> *only* two documented examples how it can be used with the library >> classes are file objects (which I use all the time) and thread locks >> which I almo

Re: with statement and standard library

2010-02-21 Thread John Nagle
nobrowser wrote: Hi. The with statement is certainly nifty. The trouble is, the *only* two documented examples how it can be used with the library classes are file objects (which I use all the time) and thread locks which I almost never use. Yet there are many, many classes in the library whos

Re: with statement and standard library

2010-02-19 Thread Terry Reedy
On 2/19/2010 2:18 AM, nobrowser wrote: Hi. The with statement is certainly nifty. The trouble is, the *only* two documented examples how it can be used with the library classes are file objects (which I use all the time) and thread locks which I almost never use. Yet there are many, many class

Re: with statement and standard library

2010-02-19 Thread Robert Kern
On 2010-02-19 01:18 AM, nobrowser wrote: Hi. The with statement is certainly nifty. The trouble is, the *only* two documented examples how it can be used with the library classes are file objects (which I use all the time) and thread locks which I almost never use. Yet there are many, many cla

Re: with statement and standard library

2010-02-19 Thread alex23
nobrowser wrote: > Yet there are many, many classes in the > library whose use would be more elegant and readable if the with > statement could be employed.  Start with the connection objects in > httplib and you can probably come up with 10 others easily.  Maybe it > is the case that some of thes

with statement and standard library

2010-02-18 Thread nobrowser
Hi. The with statement is certainly nifty. The trouble is, the *only* two documented examples how it can be used with the library classes are file objects (which I use all the time) and thread locks which I almost never use. Yet there are many, many classes in the library whose use would be more