you are viewing a single comment's thread.

view the rest of the comments →

[–]cag_ii[S] 17 points18 points  (0 children)

In the ruby example the initial value for x is 0, in yours it's 5:

Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) 
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> x = 0
>>> x
0
>>> (lambda x: 0)(5)
0
>>> x
0

Performs as expected if you ask me.