[FRPythoneers] With statement

Jeffery D. Collins jcollins at boulder.net
Thu Aug 8 14:44:36 MDT 2002


This subject has been discussed in the Python world for several years. 
 A more recent discussion on the use of self has popped up recently, but 
nothing serious has been proposed.  I recall a couple of  threads:

"A better self":
http://groups.google.com/groups?q=python+better+self&ie=UTF-8&oe=UTF-8&hl=en

"Why self":
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=python+why+self

Jeff

Bob Gailer wrote:

> The OOP languages I've worked with before Python have a WITH 
> statement. I am wondering why Python is missing this (IMHO) useful 
> construct.
>
> Example:
>  self.foo1 = 'a'
>  self.foo2 = 'b'
>  self.foo3 = 'c'
>
> Could be "simplified" using WITH:
>  with self:
>    .foo1 = 'a'
>    .foo2 = 'b'
>    .foo3 = 'c'
>
> Bob Gailer
> mailto:ramrom at earthling.net
> 303 442 2625







More information about the FRPythoneers mailing list