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/2011-January/107437.html below:

[Python-Dev] Exception __name__ missing?

[Python-Dev] Exception __name__ missing? [Python-Dev] Exception __name__ missing?Georg Brandl g.brandl at gmx.net
Mon Jan 17 21:27:00 CET 2011
Am 17.01.2011 21:22, schrieb Ron Adam:
> 
> Is this on purpose?
> 
> 
> Python 3.2rc1 (py3k:88040, Jan 15 2011, 18:11:39)
> [GCC 4.4.5] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>  >>> Exception.__name__
> 'Exception'
>  >>> e = Exception('has no name')
>  >>> e.__name__
> Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
> AttributeError: 'Exception' object has no attribute '__name__'

It's not on purpose in the sense that it's not something special
to exceptions.  The class __name__ attribute is not accessible
from instances of any class.

Georg

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