Python module version types.

Code junkies hangout here

Moderators: ChrisThornett, LXF moderators

What module version type do you prefer?

String (eg. 1.2.3)
2
33%
Tuple (eg. (1, 2, 3))
4
67%
 
Total votes : 6

Python module version types.

Postby Lejon » Sat Oct 22, 2005 9:16 pm

The 2 most common types for module versions seams to be
string (eg. 1.2.3) and tuple (eg. (1, 2, 3)).

Witch of thes two do you prefer?

My thoughts.
The String one can ofcourse be printed easaly for a report.
While the tuple is easyer for advanced compair.
And I find it easyer/faster to convert from tuple to string, than from string to tuple.

Do'h, cant Edit the Pool question.
Ofcourse it is ment to be "do..." not "fo..."
I am the one you thought I was! Just not the way, you expected...
User avatar
Lejon
LXF regular
 
Posts: 150
Joined: Wed Oct 19, 2005 7:24 pm
Location: Sweden

RE: Python module version types.

Postby M-Saunders » Mon Oct 24, 2005 8:17 am

Corrected :-)

M
User avatar
M-Saunders
LXF regular
 
Posts: 2893
Joined: Mon Apr 11, 2005 12:14 pm

Re: RE: Python module version types.

Postby Lejon » Mon Oct 24, 2005 8:21 am

M-Saunders wrote:Corrected :-)

M

Thanx :D

Now if people only could start to vote!
Am I the only python dev here? I know I am not alone!
I am the one you thought I was! Just not the way, you expected...
User avatar
Lejon
LXF regular
 
Posts: 150
Joined: Wed Oct 19, 2005 7:24 pm
Location: Sweden

RE: Re: RE: Python module version types.

Postby overflow » Mon Oct 24, 2005 12:29 pm

Our version numbers are inserted by CVS so it has to be strings.
overflow
User avatar
overflow
LXF regular
 
Posts: 158
Joined: Tue Aug 23, 2005 1:40 pm
Location: London

Re: RE: Re: RE: Python module version types.

Postby Lejon » Mon Oct 24, 2005 12:32 pm

overflow wrote:Our version numbers are inserted by CVS so it has to be strings.


Dose not "has to be".
As you can easy create a function that can return it as a tuple.
However I see your point.
I am the one you thought I was! Just not the way, you expected...
User avatar
Lejon
LXF regular
 
Posts: 150
Joined: Wed Oct 19, 2005 7:24 pm
Location: Sweden


Return to Programming

Who is online

Users browsing this forum: No registered users and 3 guests