Re: assert versus print [was Re: The curious behavior of integer objects]

2007-01-16 Thread Ron Adam
Carl Banks wrote: Ron Adam wrote: There have been times where I would like assert to be a little more assertive than it is. :-) ie.. not being able to turn them off with the -0/-00 switches, and having them generate a more verbose traceback. Personally, I'd rather see it get less

Re: assert versus print [was Re: The curious behavior of integer objects]

2007-01-16 Thread Neil Cerutti
On 2007-01-16, Ron Adam [EMAIL PROTECTED] wrote: I have to admit that part of why assert seems wrong to me is the meaning of the word implies something you shouldn't be able to ignore. While warnings seem like something that can be disregarded. Experienced C coders expect assert to behave

Re: assert versus print [was Re: The curious behavior of integer objects]

2007-01-16 Thread Ron Adam
Neil Cerutti wrote: On 2007-01-16, Ron Adam [EMAIL PROTECTED] wrote: I have to admit that part of why assert seems wrong to me is the meaning of the word implies something you shouldn't be able to ignore. While warnings seem like something that can be disregarded. Experienced C

Re: assert versus print [was Re: The curious behavior of integer objects]

2007-01-16 Thread Carl Banks
Neil Cerutti wrote: On 2007-01-16, Ron Adam [EMAIL PROTECTED] wrote: I have to admit that part of why assert seems wrong to me is the meaning of the word implies something you shouldn't be able to ignore. While warnings seem like something that can be disregarded. Experienced C coders

assert versus print [was Re: The curious behavior of integer objects]

2007-01-15 Thread Steven D'Aprano
On Mon, 15 Jan 2007 17:50:56 -0500, Calvin Spealman wrote: assert foo(0x10) == 0 # Assertions are much better tests than prints :-) I dispute that assertion (pun intended). Firstly, print statements work even if you pass the -O (optimize) flag to Python. Your asserts don't. Secondly, a bare

Re: assert versus print [was Re: The curious behavior of integer objects]

2007-01-15 Thread Ron Adam
Calvin Spealman wrote: On 1/15/07, Steven D'Aprano [EMAIL PROTECTED] wrote: On Mon, 15 Jan 2007 17:50:56 -0500, Calvin Spealman wrote: assert foo(0x10) == 0 # Assertions are much better tests than prints :-) I dispute that assertion (pun intended). Hah! Firstly, print statements work

Re: assert versus print [was Re: The curious behavior of integer objects]

2007-01-15 Thread Steven D'Aprano
On Mon, 15 Jan 2007 21:38:42 -0500, Calvin Spealman wrote: On 1/15/07, Steven D'Aprano [EMAIL PROTECTED] wrote: On Mon, 15 Jan 2007 17:50:56 -0500, Calvin Spealman wrote: assert foo(0x10) == 0 # Assertions are much better tests than prints :-) I dispute that assertion (pun intended).

Re: assert versus print [was Re: The curious behavior of integer objects]

2007-01-15 Thread Calvin Spealman
On 1/15/07, Steven D'Aprano [EMAIL PROTECTED] wrote: On Mon, 15 Jan 2007 21:38:42 -0500, Calvin Spealman wrote: On 1/15/07, Steven D'Aprano [EMAIL PROTECTED] wrote: On Mon, 15 Jan 2007 17:50:56 -0500, Calvin Spealman wrote: assert foo(0x10) == 0 # Assertions are much better tests than

Re: assert versus print [was Re: The curious behavior of integer objects]

2007-01-15 Thread Calvin Spealman
On 1/15/07, Steven D'Aprano [EMAIL PROTECTED] wrote: On Mon, 15 Jan 2007 17:50:56 -0500, Calvin Spealman wrote: assert foo(0x10) == 0 # Assertions are much better tests than prints :-) I dispute that assertion (pun intended). Hah! Firstly, print statements work even if you pass the -O

Re: assert versus print [was Re: The curious behavior of integer objects]

2007-01-15 Thread Steven D'Aprano
On Mon, 15 Jan 2007 21:01:35 -0600, Ron Adam wrote: There have been times where I would like assert to be a little more assertive than it is. :-) ie.. not being able to turn them off with the -0/-00 switches, and having them generate a more verbose traceback. If you want something

Re: assert versus print [was Re: The curious behavior of integer objects]

2007-01-15 Thread Ron Adam
Steven D'Aprano wrote: On Mon, 15 Jan 2007 21:01:35 -0600, Ron Adam wrote: There have been times where I would like assert to be a little more assertive than it is. :-) ie.. not being able to turn them off with the -0/-00 switches, and having them generate a more verbose

Re: assert versus print [was Re: The curious behavior of integer objects]

2007-01-15 Thread Carl Banks
Ron Adam wrote: There have been times where I would like assert to be a little more assertive than it is. :-) ie.. not being able to turn them off with the -0/-00 switches, and having them generate a more verbose traceback. Personally, I'd rather see it get less assertive, i.e., having it