New submission from Eli Bendersky <[email protected]>:

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.

----------
components: Interpreter Core
messages: 116911
nosy: eli.bendersky, ncoghlan
priority: normal
severity: normal
status: open
title: Cosmetic issues  that might be worthy a fix in symtable.h/c
type: behavior
versions: Python 3.2

_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue9904>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to