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/2001-December/018837.html below:

[Python-Dev] __getattribute__ should require a string?

[Python-Dev] __getattribute__ should require a string? [Python-Dev] __getattribute__ should require a string?Guido van Rossum guido@python.org
Tue, 04 Dec 2001 08:31:32 -0500
> Is there any reason why people should be allowed to assign and
>  retrieve attributes with non-string names?

Not really, but why should we actively try to prevent it when it's
easy to do self.__dict__[1] = 'a'?  This means you can't rely on all
attribute names being strings, and I'm not going to prevent *that*.

The proper fix IMO for the bug you found is to be more careful when
formatting the error message.

--Guido van Rossum (home page: http://www.python.org/~guido/)



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