Skip to content

Commit 862cda9

Browse files
author
Philip Guo
committed
tiny update for Py3k compatibility
1 parent 9f2e299 commit 862cda9

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎v3/example-code/for-else.golden‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"code": "# find primes using a for-else construct\nfor n in range(2, 10):\n x_range = range(2, n)\n for x in x_range:\n if n % x == 0:\n break\n else:\n # loop fell through without finding a factor\n print n\n",
2+
"code": "# find primes using a for-else construct\nfor n in range(2, 10):\n x_range = range(2, n)\n for x in x_range:\n if n % x == 0:\n break\n else:\n # loop fell through without finding a factor\n print(n)\n",
33
"trace": [
44
{
55
"ordered_globals": [],

‎v3/example-code/for-else.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ for n in range(2, 10):
66
break
77
else:
88
# loop fell through without finding a factor
9-
print n
9+
print(n)

0 commit comments

Comments
 (0)