[mod_python] object isclass test in publisher

Brian Hawthorne brianh at exelixis.com
Wed May 21 19:22:49 EST 2003


hello,
i noticed today while poking around in publisher.py that line 165,
testing if the resolved object is a class, needs updating.  it checks if
str(type(object)) == "<type 'class'>"; but that is not true for
new-style classes, as shown below:

  >>> class A: pass
...
  >>> str(type(A))
"<type 'class'>"
  >>> class B (object): pass
...
  >>> str(type(B))
"<type 'type'>"


brian hawthorne



More information about the Mod_python mailing list