Message116911
The following minor issues may affect the readability of the code implementing symbol tables in Include/symtable.h and Python/symtable.c
* The comment for st_global in symtable.h says: "borrowed ref to st_top->st_symbols. typo? (st_top->ste_symbols)
* ste_varnames: the name and the comment after it are misleading, since it actually collects only the function's parameters and not all variables.
* the st_nblocks and st_future fields of symtable aren't used anywhere - py3k compiles fine when they're removed.
* in analyze_block a comment says "Recursively call analyze_block()" - untrue, probably meant analyze_child_block. While technically analyze_child_block calls analyze_block, the comment as-is appears misleading.
* symtable_add_def is also called with the USE flag, not only definitions, hence its name doesn't reflect its purpose accurately
* There are some indentation artifacts that obscure readability. For example the case Raise_kind of symtable_visit_stmt, where two nested blocks start and end in the same column obscuring the fact they're nested. This could be a result of an automatic tab to space conversion in the past. |
|
Date |
User |
Action |
Args |
2010-09-20 06:29:06 | eli.bendersky | set | recipients:
+ eli.bendersky, ncoghlan |
2010-09-20 06:29:06 | eli.bendersky | set | messageid: <1284964146.62.0.95975690396.issue9904@psf.upfronthosting.co.za> |
2010-09-20 06:29:04 | eli.bendersky | link | issue9904 messages |
2010-09-20 06:29:02 | eli.bendersky | create | |
|