logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: CVS: CMF/CMFDefault - MembershipTool.py:1.43: msg#00054

Subject: Re: CVS: CMF/CMFDefault - MembershipTool.py:1.43
On Tue, 10 Feb 2004 22:02:31 +0100
Florent Guillaume <fg@xxxxxxxxx> wrote:

> The use case I have is for special folders (proxy folders) in CPS
> where the __getitem__ behavior is designed to do other things than
> direct attribute access (there is a better separation between
> attribute access and subitem access).
> 
> You're right about the aq_base, but I'll code it differently:
>    if hasattr(aq_base(members), id):
>      folder = getattr(members, id)
>      ...

Except that hasattr swallows conflict errors... 8^/

> Note that getattr is used in getMembersFolder and createMemberArea and
> 
> not [] so I wanted to homogenize things and at the same time fix my
> problem.
> 
> But if you still think it's problematic I'll remove it and
> monkey-patch it from CPS.

Nah, it seems ok. Just muddles up the code a bit. I'm ok with it.

-Casey
> 


<Prev in Thread] Current Thread [Next in Thread>