Re: [Python-Dev] Exception for setting attributes of built-in type

2009-06-15 Thread Guido van Rossum
On Sun, Jun 14, 2009 at 4:19 PM, Guido van Rossumgu...@python.org wrote: In general, CPython isn't always consistent in raising AttributeError and TypeError when it comes to such policy issues: there are various places that raise TypeError in typeobject.c (and probably elsewhere) that simply

Re: [Python-Dev] Exception for setting attributes of built-in type

2009-06-15 Thread Benjamin Peterson
2009/6/15 Nick Coghlan ncogh...@gmail.com: Guido van Rossum wrote: In general, CPython isn't always consistent in raising AttributeError and TypeError when it comes to such policy issues: there are various places that raise TypeError in typeobject.c (and probably elsewhere) that simply forbid

Re: [Python-Dev] Exception for setting attributes of built-in type

2009-06-15 Thread Nick Coghlan
Benjamin Peterson wrote: 2009/6/15 Nick Coghlan ncogh...@gmail.com: Guido van Rossum wrote: In general, CPython isn't always consistent in raising AttributeError and TypeError when it comes to such policy issues: there are various places that raise TypeError in typeobject.c (and probably

[Python-Dev] Exception for setting attributes of built-in type

2009-06-14 Thread Seo Sanghyeon
Exception for setting attributes of built-in type differs between CPython and IronPython. This is not purely theoretical, as zope.interface tries to set Implements declaration as __implemented__ attribute of built-in type object, and excepts TypeError. Python 2.6.1 object.flag = True TypeError:

Re: [Python-Dev] Exception for setting attributes of built-in type

2009-06-14 Thread Terry Reedy
Seo Sanghyeon wrote: Exception for setting attributes of built-in type differs between CPython and IronPython. This is not purely theoretical, as zope.interface tries to set Implements declaration as __implemented__ attribute of built-in type object, and excepts TypeError. Python 2.6.1

Re: [Python-Dev] Exception for setting attributes of built-in type

2009-06-14 Thread MRAB
Seo Sanghyeon wrote: Exception for setting attributes of built-in type differs between CPython and IronPython. This is not purely theoretical, as zope.interface tries to set Implements declaration as __implemented__ attribute of built-in type object, and excepts TypeError. Python 2.6.1

Re: [Python-Dev] Exception for setting attributes of built-in type

2009-06-14 Thread Guido van Rossum
On Sun, Jun 14, 2009 at 3:42 PM, MRABpyt...@mrabarnett.plus.com wrote: Seo Sanghyeon wrote: Exception for setting attributes of built-in type differs between CPython and IronPython. This is not purely theoretical, as zope.interface tries to set Implements declaration as __implemented__