Kaydet (Commit) 68a3294f authored tarafından Andrew M. Kuchling's avatar Andrew M. Kuchling

[Bug #779469] Fix error in example code

üst bf71fa1a
...@@ -1055,7 +1055,7 @@ class FakeSeq: ...@@ -1055,7 +1055,7 @@ class FakeSeq:
def __getitem__(self, item): def __getitem__(self, item):
if isinstance(item, slice): if isinstance(item, slice):
indices = item.indices(len(self)) indices = item.indices(len(self))
return FakeSeq([self.calc_item(i) in range(*indices)]) return FakeSeq([self.calc_item(i) for i in range(*indices)])
else: else:
return self.calc_item(i) return self.calc_item(i)
\end{verbatim} \end{verbatim}
...@@ -2386,7 +2386,8 @@ name. ...@@ -2386,7 +2386,8 @@ name.
The author would like to thank the following people for offering The author would like to thank the following people for offering
suggestions, corrections and assistance with various drafts of this suggestions, corrections and assistance with various drafts of this
article: Jeff Bauer, Simon Brunning, Brett Cannon, Michael Chermside, article: Jeff Bauer, Simon Brunning, Brett Cannon, Michael Chermside,
Andrew Dalke, Scott David Daniels, Fred~L. Drake, Jr., Kelly Gerber, Andrew Dalke, Scott David Daniels, Fred~L. Drake, Jr., David Fraser,
Kelly Gerber,
Raymond Hettinger, Michael Hudson, Chris Lambert, Detlef Lannert, Raymond Hettinger, Michael Hudson, Chris Lambert, Detlef Lannert,
Martin von~L\"owis, Andrew MacIntyre, Lalo Martins, Chad Netzer, Martin von~L\"owis, Andrew MacIntyre, Lalo Martins, Chad Netzer,
Gustavo Niemeyer, Neal Norwitz, Hans Nowak, Chris Reedy, Francesco Gustavo Niemeyer, Neal Norwitz, Hans Nowak, Chris Reedy, Francesco
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment