> I'am thinking if somehting like the follwoing work:
> 
> if( task and ( price and price.isdigit() and price.__len__() <= 3 ) and ( 
> date and eval( datetime.strptime(date, '%d %m %Y').strftime('%Y-%m-%d') ) ) ):

I just tried it out this workaround so to avoid having an extra try: except: 
but if the user doesnt enter the date properly it still raises a ValueError 
exception.

Is there a way to still use the if statemnt and somehow supress the message nd 
let else: handle it somehow?

thank you.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to