Re: [Python-Dev] Inconsistent exception for read-only properties?

2005-04-17 Thread Anthony Baxter
On Monday 18 April 2005 05:17, Barry Warsaw wrote: > Unless there are any objections in the next few days, I will take this > as a pronouncement and make the change at least in 2.5 and 2.4. God no - this isn't suitable for a bugfix release. It seems fine for 2.5, though. -- Anthony Baxter <

Re: [Python-Dev] Inconsistent exception for read-only properties?

2005-04-17 Thread Barry Warsaw
On Sun, 2005-04-17 at 15:44, Guido van Rossum wrote: > You meant 2.5 only of course. It's still a new feature and as such > can't be changed in 2.4. Fair enough. -Barry signature.asc Description: This is a digitally signed message part ___ Python-Dev

Re: [Python-Dev] Inconsistent exception for read-only properties?

2005-04-17 Thread Michael Hudson
Barry Warsaw <[EMAIL PROTECTED]> writes: > On Sun, 2005-04-17 at 14:36, Guido van Rossum wrote: > >> Personally, I think it would be fine to just change the TypeError to >> AttributeError. I expect that very few people would be hurt by that >> change (they'd be building *way* too much specific arc

Re: [Python-Dev] Inconsistent exception for read-only properties?

2005-04-17 Thread Guido van Rossum
> > Personally, I think it would be fine to just change the TypeError to > > AttributeError. I expect that very few people would be hurt by that > > change (they'd be building *way* too much specific arcane knowledge > > into their program if they had code for which it mattered). > > Unless there

Re: [Python-Dev] Inconsistent exception for read-only properties?

2005-04-17 Thread Barry Warsaw
On Sun, 2005-04-17 at 14:36, Guido van Rossum wrote: > Personally, I think it would be fine to just change the TypeError to > AttributeError. I expect that very few people would be hurt by that > change (they'd be building *way* too much specific arcane knowledge > into their program if they had c

Re: [Python-Dev] Inconsistent exception for read-only properties?

2005-04-17 Thread Barry Warsaw
On Sun, 2005-04-17 at 12:25, Aahz wrote: > Why is changing an exception more acceptable than creating a new one? > (I don't have a strong opinion either way, but I'd like some reasoning; > Jack's approach at least doesn't break code.) Especially if the new > exception isn't "public" (in the built

Re: [Python-Dev] Inconsistent exception for read-only properties?

2005-04-17 Thread Guido van Rossum
> In 2.4 & 2.3 does it make sense to raise an exception that multiply inherits > from both TypeError and AttributeError? If anyone currently does catch the > error raising only AttributeError will break their code. 2.5 should just > raise an AttributeError, of course. I think that sets a bad pre

Re: [Python-Dev] Inconsistent exception for read-only properties?

2005-04-17 Thread Aahz
On Sun, Apr 17, 2005, Barry Warsaw wrote: > On Sun, 2005-04-17 at 11:53, Jack Diederich wrote: >> >> In 2.4 & 2.3 does it make sense to raise an exception that multiply >> inherits from both TypeError and AttributeError? If anyone currently >> does catch the error raising only AttributeError will

Re: [Python-Dev] Inconsistent exception for read-only properties?

2005-04-17 Thread Jack Diederich
On Sun, Apr 17, 2005 at 11:53:31AM -0400, Jack Diederich wrote: > On Sat, Apr 16, 2005 at 07:24:27PM -0400, Barry Warsaw wrote: > > On Thu, 2005-04-14 at 23:46, Barry Warsaw wrote: > > > I've noticed an apparent inconsistency in the exception thrown for > > > read-only properties for C extension ty

Re: [Python-Dev] Inconsistent exception for read-only properties?

2005-04-17 Thread Barry Warsaw
On Sun, 2005-04-17 at 11:53, Jack Diederich wrote: > In 2.4 & 2.3 does it make sense to raise an exception that multiply inherits > from both TypeError and AttributeError? If anyone currently does catch the > error raising only AttributeError will break their code. 2.5 should just > raise an Att

Re: [Python-Dev] Inconsistent exception for read-only properties?

2005-04-17 Thread Jack Diederich
On Sat, Apr 16, 2005 at 07:24:27PM -0400, Barry Warsaw wrote: > On Thu, 2005-04-14 at 23:46, Barry Warsaw wrote: > > I've noticed an apparent inconsistency in the exception thrown for > > read-only properties for C extension types vs. Python new-style > > classes. > > I haven't seen any follow ups