[Zope] Index_html versus index.html
Dieter Maurer
dieter@handshake.de
Tue, 28 Nov 2000 23:20:37 +0100 (CET)
Chris Withers writes:
> Dieter Maurer wrote:
> >
> > Pieter Biemond writes:
> >
> > > * Why is the default file index_html and not index.html
> > > (Windows doesn't want to open files without extensions).
> > I assume, because preferences of Python, Zope's implementation
> > language, have had a higher priority than Windows preferences ;-)
> > Python does not like periods in names.
>
> That's not really true, python doesn't seem to care a lot about what's
> in a name.
A name is a well defined lexical entity in Python:
a sequence of letters, '_' and digits, starting with
a letter or '_'.
> If you have periods, it just means you need things like:
>
> getattr(getattr(getattr(globals(),'x.y'), 'z.a'), 'index.html')
What you want to say:
attributes can be referenced with more general entities
than names, e.g. arbitrary strings.
But:
Try to define a method(!) "index.html" in a class.
I know, it is possible. But it is not natural.
Dieter