Perhaps this is intended behaviour, but if you create an instance of
InternalPrincipal, and then attempt to iterate over it, it will
infinitely return None.

The following code does the trick:

from zope.app.authentication.principalfolder import InternalPrincipal
joe = InternalPrincipal("joe", "123", "Joe")
for key in joe:
    print key

It took me a while to track this down, and now that I know what it is,
I'm sure I can work around it, but I thought it would be worth
bringing up. Here is InternalPrincipal's __getitem__

    def __getitem__(self, attr):
        if attr in ('title', 'description'):
            return getattr(self, attr)



Alec Munro
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to