[issue4327] Patch: simplify complex constant assignment statements
David Turner
report at bugs.python.org
Mon Nov 24 19:19:03 CET 2008
David Turner <novalis at novalis.org> added the comment:
Everything in optimize.c is about modifying the AST (this is on tlee's
ast optimization branch, in case I didn't mention earlier). Also,
changing asdl_seq_SET would be a bad idea, since it is used for
sequences of things other than stmt_tys.
What if asdl_seq were instead a doubly-linked list? Then each node
contains enough information to add and remove elements. asdl_seq_LEN
would be slower, but it is rarely used. To be really slick, we could
store the len of the seq in the first element's prev pointer as (len <<
1) | 1.
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4327>
_______________________________________
More information about the Python-bugs-list
mailing list