[Python-Dev] 2.4.4: backport classobject.c HAVE_WEAKREFS? (original) (raw)
Raymond Hettinger rhettinger at ewtllc.com
Tue Oct 10 23:47:26 CEST 2006
- Previous message: [Python-Dev] ConfigParser: whitespace leading comment lines
- Next message: [Python-Dev] 2.4.4: backport classobject.c HAVE_WEAKREFS?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 Py_TPFLAGS_DEFAULT.
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 tpxxx 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.
Raymond
- Previous message: [Python-Dev] ConfigParser: whitespace leading comment lines
- Next message: [Python-Dev] 2.4.4: backport classobject.c HAVE_WEAKREFS?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]