On Wednesday 10 April 2002 04:00 pm, Edmund Lian wrote:
> Chuck wrote:
> >It sounds like the assert should be changed to an "if: raise" to be
> >more clear and avoid being "optimized out".
>
> Maybe so, but regardless of how the type checking is done, I think we
> ought to be able to use delegation. With autodelegation, all the
> additional methods that might be added to Servlet etc. in the future
> are still available to unless specifically overridden by the
> delegating servlet.
>
> Delegation is a superset of inheritance, and if it isn't allowed, we
> all lose a rather important mechanism for managing all the issues
> that come with just using inheritance to structure code.
>
> I'm not advocating against inheritance. What I am advocating is that
> the type check needs to be able to be turned off, or made a bit more
> intelligent.
>
> ...Edmund.

Can you give me a Python code example of the type of delegation you 
want to have and implement? It would help me wrap my head around the 
points you are raising.

Off the top of my head, it seems that you could do something with 
__getattr__ and/or __getattribute__ (new to Python 2.2), but we need to 
get more concrete on the nature and use of the delegation you desire.

(Sorry if you already did this and I missed the msg on the list. If 
that's the case, just tell me.)

-Chuck

_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to