On Mon, 21 Aug 2000, Philipp Auersperg wrote:
> Interesting fact:
> When retrieving the method object with "m=self.dbTest" and then with 
> "print m,m1" show the same string but "m==m1" results to false!
> What am I doing wrong? There seems something mixed up with namespaces, but I am too 
>solly to solve it :(

I *think* what you are running into here is the difference between
an context-wrapped object and the unwrapped object.  I think __dict__
gets you the latter, but self.dbTest calls __getattr__ and the Zope
hook for that returns a wrapped object.  The wrapped object can
use acquisition to find the db connection, the unwrapped object can't.

As you found, getattr is the way to do what you want.


Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to