A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2009-July/090876.html below:

[Python-Dev] Py_TPFLAGS_HEAPTYPE too overloaded

[Python-Dev] Py_TPFLAGS_HEAPTYPE too overloaded [Python-Dev] Py_TPFLAGS_HEAPTYPE too overloadedGreg Ewing greg.ewing at canterbury.ac.nz
Mon Jul 27 03:05:55 CEST 2009
Joshua Haberman wrote:
> This is not as bad as having someone
> set __class__ on one of my instances, or set attributes on my type, etc.

Is there any real need to prevent someone from doing
those things?

Note that even when you are allowed to change the
__class__ of an instance, you're still prevented
from changing it to something that has a different
C layout, so you can't crash the intepreter that
way.

Similarly, built-in methods check that they're
given an object of appropriate type at the C
level.

My suggestion is to just let it be a full heap
type and accept whatever consequences follow.

-- 
Greg
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