moshez at math.huji.ac.il
Fri Apr 28 01:12:09 EDT 2000
On Thu, 27 Apr 2000, GTE wrote:
> On the other hand I kinda like Visual Basic's 'with' construct. Consider:
> def method(self,arg1,arg2):
> with self:
> .spam = "spam"
> .eggs = arg1+arg2
Here's a way to get almost that effect:
def method(self, arg1, arg2):
_ = self
_.spam = "spam"
_.egss = arg1 + arg2
Moshe Zadka <mzadka at geocities.com>.
http://www.linux.org.il -- we put the penguin in .com
More information about the Python-list