homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author benjamin.peterson
Recipients belopolsky, benjamin.peterson
Date 2011年02月03日.17:28:06
SpamBayes Score 4.55234e-08
Marked as misclassified No
Message-id <AANLkTinHs870HhVWxzH7+PVS0PWkYudM4DtUbsSFQVLr@mail.gmail.com>
In-reply-to <AANLkTimaGRZYef8mGC0zRY30yFHG_WGQnf97Upy2Wa0U@mail.gmail.com>
Content
2011年2月3日 Alexander Belopolsky <report@bugs.python.org>:
>
> Alexander Belopolsky <belopolsky@users.sourceforge.net> added the comment:
>
> On Thu, Feb 3, 2011 at 12:08 PM, Benjamin Peterson
> <report@bugs.python.org> wrote:
> ..
>>> I wonder: Why ast nodes need to be mutable?
>>
>> So people can change them.
>
> Well, they are hashable, so this needs to be done carefully. Is this
> necessary for AST-based optimizations? Does Python actually change
> AST after it has been created? Note that for some optimizations it
> may be more appropriate to build a new tree rather than mutate the old
> one. Depending on the algorithm, you may or may not need to change
> the nodes after they have been created in the process.
Other people are, though. The hash is by identity anyway.
History
Date User Action Args
2011年02月03日 17:28:07benjamin.petersonsetrecipients: + benjamin.peterson, belopolsky
2011年02月03日 17:28:06benjamin.petersonlinkissue11105 messages
2011年02月03日 17:28:06benjamin.petersoncreate

AltStyle によって変換されたページ (->オリジナル) /