WIT runtime bug

Ah, yes, it does look nicer. I'll fix that.

And now for something completely different... Why does this module include a __revision__ tag? The convention is to have a __version__ tag.

The __revision__ line goes like this:
__revision__ = "$Revision$"[14:-2]
and I don't understand the reason for having the slice notation. Anyone care to explain?

The revision line is actually

revision = “$Revision$”[11:-2]

so 11 instead of 14, but you get the idea.

Anyway, made a new patch. I wanted to remove the slice notation [11:-2] in the revision line but I wasn’t sure if it’s okay. Please explain why is it that it needs to be hardcoded.

filling.patch (4.71 KB)

Bo�tjan Mejak wrote:

The __revision__ line is actually
__revision__ = "$Revision$"[11:-2]
so 11 instead of 14, but you get the idea.

Anyway, made a new patch. I wanted to remove the slice notation [11:-2]
in the __revision__ line but I wasn't sure if it's okay. Please explain
why is it that it needs to be hardcoded.

Back in the old days when CVS was the commonly used revision control system it was common to put some keywords like $Id$ or $Revision$ (or some others) in the source file. When the file was checked out from revision control CVS would substitute those keywords with text specifying the actual revision number, or commit date, or whatever for that file. It was a convenient way to know exactly which revision of the file you are looking at, especially since CVS tracked separate version numbers for every file. Subversion has a mode where it will also substitute text for those CVS keywords, but it is turned off by default.

It doesn't hurt anything to keep them in the source file, so I haven't worried about going through and removing them everywhere.

···

--
Robin Dunn
Software Craftsman