Sander Sweers wrote:
On Tue, Jan 6, 2009 at 04:38, bob gailer <[email protected]> wrote:I also suggest splitting convertValue into two functions, one that takes strings and one that takes numbers. A lot easier to read and maintain. Yes - that is what we had in mind. FWIW you can simplify slightly: def convertToString(value, dateformat):
print value
if type(value) == int:
return str(value)
try:
return strftime(dateformat, value)
except TypeError:
return value
-- Bob Gailer Chapel Hill NC 919-636-4239 |
_______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
