Explicit Frustration of the Self

Robin Munn rmunn at pobox.com
Fri Jan 3 00:21:18 CET 2003

Cliff Wells <LogiplexSoftware at earthlink.net> wrote:
> I (sheepishly) admit that I'm kind of fond of the "with" statement some
> languages have:
> somelongname.x = 1
> with somelongname:
>     .x += 1
>     print .x 
> It's a bit more explicit and more versatile as well (can be used for
> more than just self).  I'm certain a PEP has been written and rejected
> on this (or maybe enough arguing was done on c.l.py that a PEP was never
> bothered with), so I'll just be jealous of VB programmers for this one
> little thing.  

Hmmm, a quick search of http://www.python.org/peps/ doesn't turn up
anything that looks like a PEP suggesting a "with" keyword. If you like
it enough, why not write the PEP and try to get it included?

Robin Munn <rmunn at pobox.com>
PGP key ID: 0x6AFB6838    50FF 2478 CFFB 081A 8338  54F7 845D ACFD 6AFB 6838

More information about the Python-list mailing list