Some language proposals.

Paul Prescod paul at prescod.net
Thu Feb 26 04:31:33 EST 2004


Jacek Generowicz wrote:
> I do wish you'd run your examples through a Python interpreter before
> posting them. The little bugs you include, really interfere with
> trying to understand what your point is.

Sorry. Don't know what else I can do:

bash-2.05a$ cat foo.py
class a:
           pass

def func():
           pass

lst = [1, 2, 3, "a", "b", "c", object(), lambda x:x ]

for x in lst:
          a.b = x
          assert a.b is x, "What???? %s"% x
          print "Okay", x

bash-2.05a$ python foo.py
Okay 1
Okay 2
Okay 3
Okay a
Okay b
Okay c
Okay <object object at 0x116e20>
Traceback (most recent call last):
   File "foo.py", line 11, in ?
     assert a.b is x, "What???? %s"% x
AssertionError: What???? <function <lambda> at 0x122190>
bash-2.05a$

And this is after cutting and pasting the program from your reply back 
into a file.

Given that I was trying to demonstrate an inconsistency in behaviour I 
felt it helpful to show examples of logical behaviour.

  Paul Prescod





More information about the Python-list mailing list