#32 Can't bind a class in Python 2.1.1

closed-fixed
nobody
5
2004-03-04
2004-03-04
Tim Delaney
No

In python 2.1.1, isinstance() cannot take a tuple as the
second parameter. This results in:

Traceback (most recent call last):
File "F:\Viper\src\vis\app\XmlObject.py", line 410, in ?
psyco.bind(Base)
File "C:\Python21\psyco\core.py", line 141, in bind
if isinstance(o, (types.MethodType,
TypeError: isinstance() arg 2 must be a class or type

due to the code:

funcs = [o for o in x.__dict__.values()
if isinstance(o, (types.MethodType,
types.FunctionType))]

when trying to bind a class.

Discussion

  • Armin Rigo

    Armin Rigo - 2004-03-04
    • status: open --> closed
     
  • Armin Rigo

    Armin Rigo - 2004-03-04

    Logged In: YES
    user_id=4771

    Thanks! Fixed in cvs.

     
  • Armin Rigo

    Armin Rigo - 2004-03-04
    • status: closed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks