T
Tim Johnson
Consider the following code:
for i in range(mylimit):
foo()
running pychecker gives me a
"""
Local variable (i) not used
"""
complaint.
If I use
for dummy in range(mylimit):
....
## or
for _ in range(mylimit):
....
I get no complaint from pychecker.
I would welcome comments on best practices for this issue.
NOTE: I see much on google regarding unused local variables,
however, doing a search for 'python _' hasn't proved fruitful.
I would like to see comments here specifically on the use for `range'
On a related note: from the python interpreter if I doI get
Help on bool object:
class bool(int)
| bool(x) -> bool
......
I'd welcome comments on this as well.
I expect to be edified is so many ways, some
of them unexpected.
thanks
for i in range(mylimit):
foo()
running pychecker gives me a
"""
Local variable (i) not used
"""
complaint.
If I use
for dummy in range(mylimit):
....
## or
for _ in range(mylimit):
....
I get no complaint from pychecker.
I would welcome comments on best practices for this issue.
NOTE: I see much on google regarding unused local variables,
however, doing a search for 'python _' hasn't proved fruitful.
I would like to see comments here specifically on the use for `range'
On a related note: from the python interpreter if I doI get
Help on bool object:
class bool(int)
| bool(x) -> bool
......
I'd welcome comments on this as well.
I expect to be edified is so many ways, some
of them unexpected.
thanks