Jayanth Raman added the comment:
Thanks for the "interact" tip.
FWIW, I see this issue in 2.7.10 as well. Although the list comprehension
works.
$ python
Python 2.7.10 (default, Oct 6 2017, 22:29:07)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
New submission from Jayanth Raman :
I get a NameError for a variable in the generator param of a function or in a
list comprehension. See example below. The variable is available to the
program, but not to the interactive Pdb shell.
# Test file:
def main(nn=10):
xx = list(range(nn
New submission from Jayanth Raman :
In the Examples section of the timeit documentation, repeat() returns a list of
size three. But the default is now five and the documentation should reflect
that.
Thanks.
--
assignee: docs@python
components: Documentation
messages: 333635
nosy
New submission from Jayanth Raman:
It should be "128 such characters" in the following sentence:
For example, you can’t fit both the accented characters used in Western Europe
and the Cyrillic alphabet used for Russian into the 128-255 range because there
are more than 127 such
New submission from Jayanth Raman :
With file xx.py:
class Foo(object):
def __init__(self, x):
self.x = x
def __long__(self):
return long(self.x)
def __float__(self):
return float(self.x)
y = Foo(22)
print '%d' % y
print '%d' % y
Interac