Re: Assertion in list comprehension

2007-08-01 Thread Chris Mellon
On 8/1/07, beginner <[EMAIL PROTECTED]> wrote: > On Aug 1, 12:35 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > On 8/1/07, beginner <[EMAIL PROTECTED]> wrote: > > > I see. In fact I want to whole block surrounded by __debug__ to be > optimized away in non-debug runs. If the logic of my progra

Re: Assertion in list comprehension

2007-08-01 Thread beginner
L PROTECTED]> wrote: > > >> Hi, > > > >> Does anyone know how to put an assertion in list comprehension? I have > > >> the following list comprehension, but I want to use an assertion to > > >> check the contents of rec_stdl. I ended up using ano

Re: Assertion in list comprehension

2007-08-01 Thread beginner
PROTECTED]> wrote: > > > > > Hi, > > > > > Does anyone know how to put an assertion in list comprehension? I have > > > > the following list comprehension, but I want to use an assertion to > > > > check the contents of rec_stdl. I ended up using

Re: Assertion in list comprehension

2007-08-01 Thread Chris Mellon
On 01 Aug 2007 16:55:53 GMT, Stargaming <[EMAIL PROTECTED]> wrote: > On Wed, 01 Aug 2007 11:28:48 -0500, Chris Mellon wrote: > > > On 8/1/07, beginner <[EMAIL PROTECTED]> wrote: > >> Hi, > >> > >> Does anyone know how to put an assertion in

Re: Assertion in list comprehension

2007-08-01 Thread Chris Mellon
On 8/1/07, beginner <[EMAIL PROTECTED]> wrote: > On Aug 1, 11:28 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > On 8/1/07, beginner <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > Hi, > > > > > Does

Re: Assertion in list comprehension

2007-08-01 Thread beginner
On Aug 1, 11:28 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On 8/1/07, beginner <[EMAIL PROTECTED]> wrote: > > > > > > > Hi, > > > Does anyone know how to put an assertion in list comprehension? I have > > the following list c

Re: Assertion in list comprehension

2007-08-01 Thread Marc 'BlackJack' Rintsch
On Wed, 01 Aug 2007 16:55:53 +, Stargaming wrote: >> Thirdly: This sort of testing is precisely what unit tests and/or >> doctests are for. > > Huh? What beginner is doing there seems more like input validation than > testing. Unit or doctests are meant for testing (and in case of doctests,

Re: Assertion in list comprehension

2007-08-01 Thread Stargaming
On Wed, 01 Aug 2007 11:28:48 -0500, Chris Mellon wrote: > On 8/1/07, beginner <[EMAIL PROTECTED]> wrote: >> Hi, >> >> Does anyone know how to put an assertion in list comprehension? I have >> the following list comprehension, but I want to use an assertion to >

Re: Assertion in list comprehension

2007-08-01 Thread Chris Mellon
On 8/1/07, beginner <[EMAIL PROTECTED]> wrote: > Hi, > > Does anyone know how to put an assertion in list comprehension? I have > the following list comprehension, but I want to use an assertion to > check the contents of rec_stdl. I ended up using another loop which > es

Re: Assertion in list comprehension

2007-08-01 Thread beginner
On Aug 1, 11:09 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Aug 1, 9:37 am, beginner <[EMAIL PROTECTED]> wrote: > > > > > > > Hi, > > > Does anyone know how to put an assertion in list comprehension? I have > > the fo

Re: Assertion in list comprehension

2007-08-01 Thread [EMAIL PROTECTED]
On Aug 1, 9:37 am, beginner <[EMAIL PROTECTED]> wrote: > Hi, > > Does anyone know how to put an assertion in list comprehension? I have > the following list comprehension, but I want to use an assertion to > check the contents of rec_stdl. I ended up using another loo

Assertion in list comprehension

2007-08-01 Thread beginner
Hi, Does anyone know how to put an assertion in list comprehension? I have the following list comprehension, but I want to use an assertion to check the contents of rec_stdl. I ended up using another loop which essentially duplicates the functions of list comprehension. It just look like a waste