[PEAK] peak binding.Component vs inspect

Doug Quale quale1 at charter.net
Sat Mar 12 13:37:00 EST 2005


I am not able to get the inspect module to work with
binding.Component.

With Python 2.4.1 and peak from CVS on Feb 23, I get

>>> from peak.api import binding
>>> class Car(binding.Component):
...     passengers = binding.Make(dict)
... 
>>> aCar = Car()
>>> import inspect
>>> inspect.getmembers(aCar)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/inspect.py", line 171, in getmembers
    value = getattr(object, key)
  File "/usr/local/lib/python2.4/site-packages/protocols/classic.py", line 147, in __get__
    raise AttributeError(
AttributeError: __conform__ registry does not pass to instances
>>> 

Should I be trying this a different way?

Thanks for any help you can give me.



More information about the PEAK mailing list