[Python-Dev] Dinamically set call method (original) (raw)

Skip Montanaro skip.montanaro at gmail.com
Tue Nov 4 19:25:09 CET 2014


On Tue, Nov 4, 2014 at 10:52 AM, Roberto Martínez < robertomartinezp at gmail.com> wrote:

$ cat testcall.py class A:

You are using old-style classes in Python 2.7 unless you explicitly inherit from object. If I vary the class line to be "class A(object):" I get the same behavior with 2.7 as you see with 3.4. My guess is this causes the different behavior between versions. You might also find it useful to "print A.call" and "print a.call" with different class statements.

Skip -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20141104/fbaa4d0e/attachment.html>



More information about the Python-Dev mailing list