On Mon, Jul 13, 2009 at 6:42 PM, Joe Barnhart <joe.barnh...@gmail.com>wrote:

>
> I see no benefit to using PEP343 just to provide syntactic sugar for
> this purpose.  There is no REASON to use the "with" statement because
> we're not doing anything with exception handling here.  It's only
> being used to create an input format that looks prettier to some eyes.
>
> Am I missing something??


I haven't looked at this all that much, but I don't think exceptions are the
motivator as much as setup / cleanup needs.  One of the examples is critical
sections / "with lock:..."

One place this would be useful in gluon (to preserve context)  would be a
useful way to improve csv file IO in gluon.



>
>
> On Jul 13, 2:40 pm, Yarko Tymciurak <yark...@gmail.com> wrote:
> > There are 2 interesting aspects from Luis's  blogger post:
> >
> > - to use with, classes need to consider contexts;
> > - the (to me, at least) interesting example of ASP.NET's xmlwriter class
> > (generating SVG dynamically) is... .NET specific;  I'm off busy looking
> for
> > a python portable idiom to use in place of his last example...
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to