Checking for valid date input and convert appropriately

Chris Angelico rosuav at gmail.com
Fri Feb 22 09:03:11 EST 2013


On Sat, Feb 23, 2013 at 12:35 AM, Lele Gaifax <lele at metapensiero.it> wrote:
> Ferrous Cranus <nikos.gr33k at gmail.com> writes:
>
>> Let me ask it like this:
>> How can i avoid using try: except: for checkign the date but instead check it with an if statement:
>
> Let me answer this way: you can't, without resorting to the simple
> helper functions I wrote in my previous message.
>
> Why do you dislike that solution?

This is very similar to the previous threads that the OP has engaged
in recently. He asks a question of the form "How can I do X, without
using facility Y" where Y is the obvious way to do X.

http://redwing.hutman.net/~mreed/warriorshtm/ferouscranus.htm

My days of not taking him seriously are certainly coming to a middle.

ChrisA



More information about the Python-list mailing list