From: brk@... Date: 2002-04-03T07:03:11+09:00 Subject: RE: seeking to understand... [Bryn Keller] > Am I correct to say performing lexical closure > in Python is about equal to performing it in Java? > > YS. [Bryn Keller] No. It used to be more difficult, but now (2.2) it's pretty straightforward: Python 2.2 (#28, Dec 21 2001, 12:21:22) [MSC 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> def make_adder(num): ... def adder(num2): ... return num + num2 ... return adder ... >>> add_one = make_adder(1) >>> add_one(5) 6 >>>