I've rewritten your middle example to be clearer.
$ python2.4
Python 2.4.1 (#1, May 16 2005, 15:15:14) 
[GCC 4.0.0 20050512 (Red Hat 4.0.0-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> type("Y", (type,), {"mro": lambda x: [float]})("X", (), {})

and here's another one for you to enjoy:
>>> import marshal
>>> f = lambda: None
>>> code = 
>>> marshal.loads(marshal.dumps(f.func_code).replace('d\0\0S','d\xff\xffS'))
>>> f.func_code = code
>>> f()

Jeff

Attachment: pgpJRlU4jt6JK.pgp
Description: PGP signature

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to