suggestion on an operator

Gregory Trubetskoy grisha at ispol.com
Thu Apr 20 22:27:10 EDT 2000


Hello there - 

I'm looking for suggestions for the best operator to use in deliniating
modules from what's inside of them in a configuration file for the next
version of mod_python (a.k.a httpdapy).

Basically, I'd like to give the user an option to specify a handler for a
particular Apache event in Apache configuration. A handler will be a
Python function (perhaps a class, but that's not relevant) in a Python
module.

E.g. mypackage.mymodule will have an authenticate() function.

If I want to configure apache to use that handler, I would put something
like this in the .htaccess config file:

PythonAuthenHandle  mypackage.mymodule::authenitcate

The question is - is "::" a good choice of syntax, or would there be any
problem with it? What I like about it is that it is somewhat intuitive for
someone who's familiar with C++. What I don't like about it is that it
isn't exactly a "scope resolution operator" in this context (and also that
it looks too much like perl)

Other alternatives: ":" this is simpler, but could be confused with a
Python function/class declaration. "/" - this would be consistent with
ZPublisher, but it makes it look like it's a file. "->" ???

Grisha




More information about the Python-list mailing list