[Python-Dev] Python 2.3a1's mandatory use of cyclic GC causes existing applications to fail
Thomas Heller
theller@python.net
06 Feb 2003 21:13:23 +0100
Kevin Jacobs <jacobs@penguin.theopalgroup.com> writes:
> On Thu, 6 Feb 2003, Guido van Rossum wrote:
> > Hm... Given this feedback, it sounds like the only way to implement
> > Christian's suggestion in a backwards-compatible way would be to use a
> > different __xxx__ name, e.g. __fields__. I also like the suggestion
> > of allowing control over the order as well.
>
> Not to be difficult, but I already use '__fields__' for the same purpose as
> dictionaries assigned to __slots__ for non-slot attributes.
>
> (Yes, I know that this means nothing, since __xyz__ names are fair game,
> though I think it is extremely funny that fate is trying to kill my
> ConatraintObject metatype)
That's the exact reason ctypes uses '_fields_' as the name ;-)
Although I'm currently wondering if I should use __slots__ instead,
and set it to a whatever is needed.
Each tp_new could retrieve whatever info it needs from it,
and pass the mangled resulting __slots__ to the base metaclass
tp_new thing.
Thomas