Re: [Python-Dev] Misleading error message from PyObject_GenericSetAttr

2006-06-27 Thread Guido van Rossum
Does anyone here have time to look at this? On 6/26/06, Alexander Belopolsky <[EMAIL PROTECTED]> wrote: > On 6/19/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > On 6/14/06, Alexander Belopolsky <[EMAIL PROTECTED]> wrote: > > > ... It would be better to change the message > > > to "'Foo' objec

Re: [Python-Dev] Misleading error message from PyObject_GenericSetAttr

2006-06-26 Thread Alexander Belopolsky
On 6/19/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 6/14/06, Alexander Belopolsky <[EMAIL PROTECTED]> wrote: > > ... It would be better to change the message > > to "'Foo' object has only read-only attributes (assign to .bar)" as in > > the case tp_setattro == tp_setattr == NULL in PyObje

Re: [Python-Dev] Misleading error message from PyObject_GenericSetAttr

2006-06-19 Thread Guido van Rossum
On 6/14/06, Alexander Belopolsky <[EMAIL PROTECTED]> wrote: > When an extension type Foo defines tp_getattr, but leaves tp_setattr > NULL, an attempt to set an attribute bar results in an AttributeError > with the message "'Foo' object has no attribute 'bar'". This message > is misleading because