[New-bugs-announce] [issue30785] ast.c duplicates STR(CHILD)

Christopher Aycock report at bugs.python.org
Tue Jun 27 04:01:37 EDT 2017


New submission from Christopher Aycock:

The function alias_for_import_name() duplicates logic starting at Python/ast.c:3237

    char *sch = STR(CHILD(n, i));
    strcpy(s, STR(CHILD(n, i)));
    s += strlen(sch);
    *s++ = '.';

I assume the strcpy() is supposed to use the sch value from the line above. There shouldn't be any consequence to the code as it currently is; I just noticed it while reading through the source.

----------
components: Interpreter Core
messages: 297018
nosy: Christopher Aycock
priority: normal
severity: normal
status: open
title: ast.c duplicates STR(CHILD)
type: enhancement
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30785>
_______________________________________


More information about the New-bugs-announce mailing list