A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-June/090063.html below:

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

[Python-Dev] Exception for setting attributes of built-in type [Python-Dev] Exception for setting attributes of built-in typeBenjamin Peterson benjamin at python.org
Mon Jun 15 21:09:00 CEST 2009
2009/6/15 Nick Coghlan <ncoghlan at 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 setting a specific attribute (another example is
>> __name__).
>
> We're pretty inconsistent when it comes to looking up special methods as
> well - those that are looked up through dedicated slots in abstract.c
> usually raise TypeError, while those that are looked up via a PyType
> method usually raise AttributeError.

What's a PyType method?



-- 
Regards,
Benjamin
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4