Python headers. What is the purpose of encapsulating $ (dollar sign)?

I apologize in advance, this is what I really understood, what I can find on the Internet, but I had problems.

In Python, in the header part, I see that sometimes people wrap their literals with a dollar sign ($). It seems, judging by the examples, this is a pointer to filling in information that is automatically updated (maybe through source control?), But I don’t understand how it works.

For instance:

__version__ = '$Revision: 4799 $'.split()[1]
__date__ = '$Date: 2006-09-25 11:09:02 -0400 (Mon, 25 Sep 2006) $'.split()[1]
__author__ = 'John Doe FIX: put in the authors name'

is an example that I found in ( Documentation Template for Python Example ). Thus, $ is wrapped around a version (which will change over time) and a date (which will also change). Assuming this is some kind of pointer to always get the latest information about the version, date, etc. Can someone tell me how this works? What version control software uses this syntax? Is it the same thing in different languages?

Thank!

+5
source share
4 answers

This does not apply to Python, it is what is used by version control systems, it goes back to RCS and CVS.

. CVS CVS. CVS , ( , ) CVS . ( , , .)

+3

( CVS). , , python.

+2

" ", , RCS, CVS Subversion. , .

+1

python.

( , RCS, CVS SVN) .

+1

All Articles