A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-March/013921.html below:

[Python-Dev] test_minidom crash

[Python-Dev] test_minidom crashBarry A. Warsaw barry@digicool.com
Sat, 24 Mar 2001 12:33:47 -0500
>>>>> "GvR" == Guido van Rossum <guido@digicool.com> writes:

    GvR> The question is, should we bother to make the code robust
    GvR> under releases with -kv or not?

Yes.
    
    GvR> I used to write code that dealt with the fact that
    GvR> __version__ could be either "$Release: 1.9$" or "1.9", but
    GvR> clearly that bit of arcane knowledge got lost.

Time to re-educate then!

On the one hand, I personally try to avoid assigning __version__ from
a CVS revision number because I'm usually interested in a more
confederated release.  I.e. mimelib 0.2 as opposed to
mimelib/mimelib/__init__.py revision 1.4.  If you want the CVS
revision of the file to be visible in the file, use a different global
variable, or stick it in a comment and don't worry about sucking out
just the numbers.

OTOH, I understand this is a convenient way to not have to munge
version numbers so lots of people do it (I guess).

Oh, I see there are other followups to this thread, so I'll shut up
now.  I think Guido's split() idiom is the Right Thing To Do; it works
with branch CVS numbers too:

>>> "$Revision: 1.9.4.2 $".split()[-2:][0]
'1.9.4.2'
>>> "1.9.4.2".split()[-2:][0]
'1.9.4.2'

-Barry



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4