On Tue, Oct 30, 2012 at 1:15 AM, Maciej Fijalkowski <[email protected]> wrote: > On Tue, Oct 30, 2012 at 12:19 AM, <[email protected]> wrote: >> Hi, >> >> any place where I can find docs describing _immutable_ and >> _immutable_fields_ >> in some detail? As it happens, they don't quite do what I expected, which >> led >> to bugs. I'd like to know what their scope is and what the wildcards do. >> >> Right now I just removed them all to be safe (and allow some >> experimentation). >> But that is costing performance (20% extra overhead). >> >> Also, I see _attrs_ in quite a few places. What is it for? >> >> Thanks, >> Wim >> -- >> [email protected] -- +1 (510) 486 6411 -- www.lavrijsen.net >> _______________________________________________ >> pypy-dev mailing list >> [email protected] >> http://mail.python.org/mailman/listinfo/pypy-dev > > Hi Wim. > > I'll write some docs for them later this week, this is a bit embarrasing :)
A very short answer is "never use _immutable_ it's very confusing". _immutable_fields_ is better (for subclassing) Wildcards mean "array on the instance is immutable" so a[*] means x.a[3] will be constant folded, if x is a constant. _______________________________________________ pypy-dev mailing list [email protected] http://mail.python.org/mailman/listinfo/pypy-dev
