Object versions in Python

Graham Ashton graz at mindless.com
Sun Jan 6 06:37:17 EST 2002


In article <af635d46.0201060111.5a004894 at posting.google.com>, "Nicholas"
<nick at methodmaker.co.nz> wrote:
> 
> is there some prefered method for versioning modules, packages and/or
> classes in Python?

Stick a variable (in the module scope) that's called __version__.

e.g.

__version__ = "0.8.1"

I've no idea what to do for classes though, if anything.

-- 
Graham



More information about the Python-list mailing list