Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'except:': 0.07; 'try:': 0.07; '(although': 0.09; 'subject:skip:a 10': 0.09; 'way:': 0.09; 'discussions': 0.15; 'andreas': 0.16; 'bye,': 0.16; 'dislike': 0.16; 'wrote:': 0.17; 'this:': 0.23; 'header:In-Reply-To:1': 0.25; 'wrote': 0.26; "doesn't": 0.28; 'writes:': 0.29; 'waste': 0.30; 'message.': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'wrong': 0.34; 'doing': 0.35; 'but': 0.36; 'message-id:@gmail.com': 0.36; 'received:74.125': 0.36; 'charset:us-ascii': 0.36; 'previous': 0.37; 'subject:: ': 0.38; 'instead': 0.39; 'to:addr:python.org': 0.39; 'your': 0.60; 'received:194': 0.61; 'header:Message-Id:1': 0.62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:subject:message-id:in-reply-to:references :x-mailer:mime-version:content-type:content-transfer-encoding; bh=hB9UCTkUURH1gmaYqrR9EOVNt+SGKFqZpemhkpGCNOM=; b=uDSc0Tm+NGsbW9Zo7G1dYen6f4kTumykQRlhp/zeOewSy4x/eJJl/m1GLcIIzX+YA3 Cpe7LV6dNYoYn1j93bR/WrUPXo9hZgHO1M5G/bAMsuNPkkE+eASxmxKF4w59WD0lz1if aGtnQZ38hC+AqzaS5xYkyEWSFHLH+aVoOIaSDh+6jLpsEMwS7Im/xW1163qdfUQ1MOLL Kdyk89Qr8Vqj4T3VJDaNEiRnx46RKl6vvIP/jicpJcKO4/bF9Zc5yFvxaGJe20DekH8Y OeIfrF4WX4wVr+fn6i52iiSRF56icDfIu+cWBFN+95gKFJ/L8BRtDwl5AnOQkz9FZfnD GgZQ== X-Received: by 10.14.173.196 with SMTP id v44mr6685777eel.29.1361542254917; Fri, 22 Feb 2013 06:10:54 -0800 (PST) Date: Fri, 22 Feb 2013 15:10:52 +0100 From: Andreas Perstinger To: python-list@python.org Subject: Re: Checking for valid date input and convert appropriately In-Reply-To: <87wqu0ii8s.fsf@metapensiero.it> References: <92536c34-cf00-4497-b646-ab79fa4ee062@googlegroups.com> <5bac38bb-df2e-47b8-96dd-2b1c090959e4@googlegroups.com> <49de0696-b6f6-42ce-9272-79dac37c9605@googlegroups.com> <0065de90-75e4-4a50-b084-be6c8c7e5f23@googlegroups.com> <87wqu0ii8s.fsf@metapensiero.it> X-Mailer: Sylpheed 3.2.0beta3 (GTK+ 2.24.6; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361542262 news.xs4all.nl 6851 [2001:888:2000:d::a6]:39033 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39568 Lele Gaifax wrote: >Ferrous Cranus 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? Ferrous Cranus has proven in previous discussions (search the archives) that he doesn't like common-sense solutions and insists on doing it his own way (although his methods are either wrong or impossible). Don't waste your time. Bye, Andreas