[issue32450] non-descriptive variable name

2018-01-06 Thread Benjamin Peterson

Change by Benjamin Peterson :


--
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32450] non-descriptive variable name

2018-01-06 Thread Yuri Kanivetsky

Yuri Kanivetsky  added the comment:

Well, it's just that I was digging into Python's code. And it took me quite a 
while to figure out what the variable holds. Running into "ndots" name 
clarified that. That generally means that variable name doesn't describe its 
content well. But I'm new to Python's code, so it might not be the case. Feel 
free to close the issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32450] non-descriptive variable name

2018-01-05 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

I would accept a PR to rename the variable in ast.c to "level", but I'm not 
sure why it should matter to you.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32450] non-descriptive variable name

2018-01-05 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

'ndots' is an internal name in the import-from branch of the import statement 
handler.  It seems reasonable in that context.  'level' is part of the public 
api for the ImportFrom node class, and cannot be changed as such.  It is also 
the parameter that receives the ndot value in the ImportFrom call, to be 
assigned to the level attribute.  Making the name switch in the call is at 
least as reasonable as in the assignment.  I am not the expert here, but I 
would be inclined to rejected this as not worth the code churn.

--
nosy: +benjamin.peterson, brett.cannon, ncoghlan, terry.reedy, yselivanov

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32450] non-descriptive variable name

2017-12-29 Thread Yuri Kanivetsky

New submission from Yuri Kanivetsky :

Not a big issue, really. At some point the code switches from "ndots" name:

https://github.com/python/cpython/blob/v3.7.0a3/Python/ast.c#L3385

to "level" name:

https://github.com/python/cpython/blob/v3.7.0a3/Python/Python-ast.c#L1671

Be it "ndots" everywhere, it could save me some time.

--
messages: 309212
nosy: Yuri Kanivetsky
priority: normal
severity: normal
status: open
title: non-descriptive variable name
type: enhancement
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com