__author__
Mike C. Fletcher
mcfletch at rogers.com
Fri Oct 1 13:32:45 EDT 2004
Peter L Hansen wrote:
> Jeffrey Froman wrote:
>
>> Peter L Hansen wrote:
>>
>>> they will never actually be used (except for __version__)
>>
>>
>> So what uses __version__ ?
>
>
> Very many third party packages I have installed. It's
> not that it is *consumed* by anything, but that it seems to
> be a very widely used convention.
>
> A quick scan shows it is present in:
...
> - Numeric
> - OpenGL
And the plan is that newer versions of PyOpenGL are going to be using
Numeric's __version__ to decide what stub-dlls to load (or at least, to
complain if the version doesn't match what PyOpenGL was compiled
against). Generally speaking, the purpose of the meta-data is to have a
run-time queryable mechanism to determine information about the
package. Author isn't likely to be that interesting at run-time (save
for very specialised email-a-bug-report type stuff), but version allows
you to imply capabilities for the package.
Oh, IIRC, pydoc treats those __names__ as special and creates a separate
section for them (then they are duplicated in the "data" section IIRC).
Have fun,
Mike
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com
More information about the Python-list
mailing list