Home | History | Annotate | Download | only in distutils

Lines Matching defs:string

15   * the 'parse' method takes a string and parses it to some internal
16 representation; if the string is an invalid version number,
18 * the class constructor takes an optional string argument which,
20 * __str__ reconstructs the string that was passed to 'parse' (or
21 an equivalent string -- ie. one that will generate an equivalent
25 of the same class or a string (which will be parsed to an instance
29 import string, re
49 # __init__ (string) - create and take same action as 'parse'
50 # (string parameter is optional)
51 # parse (string) - convert a string representation to whatever
54 # __str__ (self) - convert back to a string; should be very similar
55 # (if not identical to) the string supplied to parse
59 # be an unparsed version string, or another
113 self.version = tuple(map(string.atoi, [major, minor, patch]))
115 self.version = tuple(map(string.atoi, [major, minor]) + [0])
118 self.prerelease = (prerelease[0], string.atoi(prerelease_num))
126 vstring = string.join(map(str, self.version[0:2]), '.')
128 vstring = string.join(map(str, self.version), '.')
173 # string is split up into a tuple of integer and string components, and
269 # I've given up on thinking I can reconstruct the version string
270 # from the parsed tuple -- so I just store the string here for