[Numpy-discussion] __version__ hack in Matrix.py is busted

Charles G Waldman cgw at fnal.gov
Sat Apr 8 17:54:20 CDT 2000


I can't import "Matrix" due to the following cruft:

__id__ = """
$Id: Matrix.py,v 1.1.1.1 2000/01/13 21:23:06 dubois Exp $
"""[1:-1]
import string
__version__ = int(__id__[string.index(__id__, '#')+1:-1])

You can't count on the CVS ID having a "#" character in it; each time
the file is checked in and out of CVS the Id is rewritten.  I don't
think this trick can be made to work.   I think what is needed is
either a simpler more failsafe way of setting __version__, or simply
to eliminate __version__ altogether.






More information about the Numpy-discussion mailing list