Re: [Python-Dev] Exceptions for readonly attributes

2007-03-23 Thread Guido van Rossum
Sounds like something maybe to do in 3.0. On 3/23/07, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > Re: www.python.org/sf/1687163 > > I noticed that RO members raise a TypeError upon an attempted write. In > contrast, we get an AttributeError when writing to a readonly property or to > a read

[Python-Dev] Exceptions for readonly attributes

2007-03-23 Thread Raymond Hettinger
Re: www.python.org/sf/1687163 I noticed that RO members raise a TypeError upon an attempted write. In contrast, we get an AttributeError when writing to a readonly property or to a readonly method (such as those for builtin types). IMO, the TypeError should really be an AttributeError. Howev