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/2004-February/042567.html below:

[Python-Dev] bool does not want to be subclassed?

[Python-Dev] bool does not want to be subclassed? [Python-Dev] bool does not want to be subclassed?Gerrit gerrit at nl.linux.org
Sat Feb 14 11:14:45 EST 2004
"Martin v. L=EF=BF=BDwis" wrote:
> Tim Peters wrote:
> >I expect the easiest way out is for you to decide that type objects ar=
e
> >immutable after all -- even if there are obscure ways to mutate them!
>=20
> It's not at all obscure:
>=20
> >>> class A(object):pass
> ...
> >>> type(A).__name__
> 'type'
> >>> A.foo =3D 1
> >>> A.foo
> 1
>=20
> Look, Ma, I'm mutating a type!
> No, son, you are just modifying it.

Isn't this just modifying A.__dict__, where __getattribute__ looks into
to see whether something is defined? Or is that the same thing?

Gerrit.

--=20
Weather in Twenthe, Netherlands 14/02 15:25 UTC:
	8.0=C2=B0C   wind 2.2 m/s SW (57 m above NAP)
--=20
Asperger's Syndrome - a personal approach:
	http://people.nl.linux.org/~gerrit/english/

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