I have a little question about "boolean" values of adapted objects.
For example, I had the following code :

        info = ISharedDataInfo(context, None) or \
               IPrivateDataInfo(context, None)
        if info is not None:
            return context
        return None

Even if "context" is correctly adapted to the first interface, the
boolean value matching the adapted object is not always True ; in these
cases, the second test is done, and the global result is set to "None"
instead of "context".

Of course, it's easy to modify this code with two tests instead of one,
but I'm sure there's an easy way to handle such things, so any
information would be really great !!


  Thierry Florac
  Chef de projet intranet/internet
  Office National des Forêts - Département Informatique
  2, Avenue de Saint-Mandé
  75570 PARIS Cedex 12
  Tél. : +33
  Fax. : +33

Zope3-users mailing list

Reply via email to