Re: Dispatching operations to user-defined methods

2006-05-08 Thread Hallvard B Furuseth
Michele Simionato writes: > Apparently Guido fell in love with generic functions, so > (possibly) in future Python versions you will be able to > solve dispatching problems in in an industrial strenght way. Looks interesting, I'll keep an eye on that. > Sometimes however the simplest possible way

Re: Dispatching operations to user-defined methods

2006-05-04 Thread Michele Simionato
Apparently Guido fell in love with generic functions, so (possibly) in future Python versions you will be able to solve dispatching problems in in an industrial strenght way. Sometimes however the simplest possible way is enough, and you can use something like this : class SimpleDispatcher(object

Re: Dispatching operations to user-defined methods

2006-05-03 Thread Hallvard B Furuseth
I wrote: > I'm wondering how to design this: > (...) > One obvious implementation would be to provide a class Operation, > let the user define a single subclass of this, and have the server > call request_search(), response_search(), request_modify(), > check_access() etc in that subclass. > > Then

Dispatching operations to user-defined methods

2006-05-02 Thread Hallvard B Furuseth
I'm wondering how to design this: An API to let a request/response LDAP server be configured so a user-defined Python module can handle and/or modify some or all incoming operations, and later the outgoing responses (which are generated by the server). Operations have some common elements, and so