Intelligent strptime?

Gerrit Holl gerrit.holl at pobox.com
Fri Nov 12 09:30:17 EST 1999


Ian Clarke explained why intelligent strptime is wrong:
> While I don't know what the application is, if you are processing user
> input I strongly recommend against doing this.  In a project I am
> working on the issue of whether to provide a "best guess" as to a date
> came up, but we decided that it was much better if a date had been
> entered incorrectly to furnish the user with an error, than attempt to
> correct that error automatically.  Sure in the short term it makes life
> a little easier for the user, but it also allows them to get used to the
> computer correcting their errors, and when the time comes that the
> computer cannot correct their error, or makes an incorrect guess, they
> will feel that there is something wrong ("I have always entered dates in
> MMDDYY format and it worked fine, why shouldn't it work now?").

Ah, ok. I'll force the user to type MM/DD and HH:MM...

regards,
Gerrit.
-- 
linuxgames.nl.linux.org	 All about games on Linux in Dutch (under construction).
www.nl.linux.org	       The Dutch resource for Dutch Linux documentation.
www.nl.linux.org/discoverb		    Learn foreign words and definitions.
www.nl.linux.org/~gerrit/asperger	 I'm an Asperger, go here for more info.
www.nl.linux.org/~gerrit			    About me and pictures of me.




More information about the Python-list mailing list