[Python-Dev] 2.4.4: backport classobject.c HAVE_WEAKREFS?
rhettinger at ewtllc.com
Tue Oct 10 23:47:26 CEST 2006
> The change was for clarity -- most things that have the weakref slots
> filled-in will also make the flag explicit -- that makes it easier on
> the brain when verifying code that checks the weakref flag.
> I don't understand why you added this flag here;
Perhaps my other post wasn't clear. The change wasn't necessary, so if
it bugs you, feel free to take it out. Essentially, it was a "note to
self" so that I didn't have to keep looking up what was implied by
> the slightly obscure bit that requires some getting used to is
> that all these flags don't really mean "I have such and such
> feature" but just "I could have such and such
> feature, if the corresponding tp_xxx field were set".
I would like to see that cleaned-up for Py3k. Ideally, the NULL or
non_NULL status of a slot should serve as its flag.
More information about the Python-Dev