durusmail: quixote-users: functions returning a Name Space?
functions returning a Name Space?
2004-02-24
2004-02-24
2004-02-24
functions returning a Name Space?
Bud P. Bruegger
2004-02-24
This is probably a dumb question, but here I go anyways:

Is it possible, to have the last path component (e.g. other in the examples
from the manual below) be a function that returns a namespace?  I know that
_q_lookup and _q_resolve can return namespaces, but it seems that other
callables cannot.  Is this correct?  If so, is there a special reason why
to not allow this?

In the manual text below, second record, could one extend to "if
books.other is a namespace, or is a callable that returns a namespace"?

thanks for your patience

-b


http://.../q/other    call         books.other(), if books.other
                                    is callable (eg. a function or
                                    method)
http://.../q/other    redirect to  /q/other/, if books.other is a
                                    namespace (eg. a module or sub-package)



--------------------------------------------------------------------------------
-----------------Ing.
Bud P. Bruegger, Ph.D.                 bud@comune.grosseto.it
Servizio Elaborazione Dati                    0564-488 577 (voice)
Comune di Grosseto                            0564- 21139 (fax)
Via Ginori, 43
58100 Grosseto

Collaborazione Open Source per la CIE http://www.comune.grosseto.it/cie/
reply