Previously Martin Aspeli wrote: > Jean-Pascal Houde wrote: > >Hi, > > > >I remember getting an attribute error on available, and it was because > >of an exception that was happening in the method (available). For > >some > >reason the exception was being stopped somewhere and an AttributeError > >was > >what I was seeing instead. > >So are you sure that your code isn't triggering any exception? > > > >(For exemple, self._data() could return None instead of [] so len > >would not work and raise an exception) > > I think that's right - you get the AttributeError due to some weirdness > to do with the @property descriptor when an error is thrown in the handler.
It's not really that weird, is it? I would be extremely surprised if trying to access an attribute would raise anything else than an AttributeError. Current versions of python support implementing an attribute via a property, but that does not change that expectation. Wichert. -- Wichert Akkerman <[EMAIL PROTECTED]> It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. _______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
