[Tutor] datetime module problem

Sander Sweers sander.sweers at gmail.com
Fri Apr 18 11:17:43 CEST 2008


On Fri, Apr 18, 2008 at 4:49 AM, Dick Moores <rdm at rcblue.com> wrote:
> Got it, I think. <http://py77.python.pastebin.com/f61a3c84f>

Here is a my somewhat simplified version of your daysDelta script. It
uses less variables but I am not sure if it is faster?
http://py77.python.pastebin.com/m14e4010

One thing you might want to do is look at catching wrong input. For
example when you enter nodate instead of 4/10/2008 it will raise a
ValueError. I'll give a hint, look at try and except.

Greets
Sander


More information about the Tutor mailing list