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/2000-October/010092.html below:

[Python-Dev] A small step to removing the type/class split

[Python-Dev] A small step to removing the type/class split [Python-Dev] A small step to removing the type/class splitNeil Schemenauer nas@arctrix.com
Tue, 24 Oct 2000 06:45:35 -0700
On Tue, Oct 24, 2000 at 04:06:23PM -0400, Barry A. Warsaw wrote:

[on Py_TPLAGS_INSTANCE]
> I'm not sure how well this addresses what I ran into [with a
> boolean extension type].  Would PyBooleanObject then have to
> have it's Py_TPFLAGS_INSTANCE flag set?  Does that actually
> make sense?

I think it would address your problem but I don't know if the
name of the flag makes sense.  Code around PyInstance_Check()
usually looks like this:

    if (PyInstance_Check(obj)) {
        PyObject *foo = PyObject_GetAttrString(obj, "__foo__");
        ...
    }
    else {
        ...
    }

There is not a lot of code that assumes (obj->ob_type ==
PyInstance_Type) after a PyInstance_Check().  That's encouraging.

> How does this interact with the rich comparisons idea?

I don't know.  I think I am trying to a address a deeper problem
here.

> Seems like this is a hack that doesn't quite get at the heart
> of the matter, worthwhile as it may be given the current
> implementation.

Yes, I have that feeling as well.  More deep thinking is probably
required. :)

  Neil




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