Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!transit4.readnews.com!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: cascading python executions only if return code is 0 Date: Mon, 30 Dec 2013 17:36:34 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 21 Message-ID: References: <52b782db$0$6599$c3e8da3$5496439d@news.astraweb.com> <52b7a0e4$0$29994$c3e8da3$5496439d@news.astraweb.com> NNTP-Posting-Host: c-24-118-110-103.hsd1.mn.comcast.net X-Trace: reader1.panix.com 1388424994 8447 24.118.110.103 (30 Dec 2013 17:36:34 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Mon, 30 Dec 2013 17:36:34 +0000 (UTC) User-Agent: slrn/1.0.1 (Linux) Xref: csiph.com comp.lang.python:62891 On 2013-12-27, Roy Smith wrote: > In article , > Ethan Furman wrote: > >> Mostly I don't want newbies thinking "Hey! I can use assertions for all my >> confidence testing!" > > How about this one, that I wrote yesterday; > > assert second >= self.current_second, "time went backwards" > > I think that's pretty high up on the "can never happen" list. It's not that high (depending on where you're getting "second" from). If the "second" is from the time of day, and the NTP daemon (or the system admin) decides the clock needs a stepwise adjustment, the time of day can go backwards. -- Grant