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-August/017083.html below:

Catching code that is not safe for tracking

[Python-Dev] PEP 266: Catching code that is not safe for tracking [Python-Dev] PEP 266: Catching code that is not safe for trackingSkip Montanaro skip@pobox.com (Skip Montanaro)
Thu, 16 Aug 2001 02:05:54 -0500
    >> I came up with the following possible solution.  Add a new slot to
    >> type objects that the object's author must explicitly set to
    >> Py_TRACKING_SAFE (1?).  It would default to Py_TRACKING_UNSAFE (0?).
    >> This value could be checked by _PyObject_TrackName and a warning
    >> raised if a program tries to track an unsafe object.
    >> 
    >> Would that work?

    Guido> I have yet to find the time to read PEP 266, but I expect so -- this
    Guido> is how I solve many such concerns in 2.2 already (e.g. an extension
    Guido> type is only subclassable if it has the Py_TPFLAGS_BASETYPE flag,
    Guido> which is not included in Py_TPFLAGS_DEFAULT).

Looks I should just add another flag to | into the tp_flags slot instead of
allocating another int-sized slot.

I hope to have some code for people to look at in the next few days.

thank-god-ellen's-out-of-town-ly, y'rs,

Skip



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