Skip to content

Commit ddc8f9c

Browse files
committed
Merge branch 'jun66j5-py26-compat'
2 parents 9f4fc07 + cd0f00d commit ddc8f9c

3 files changed

Lines changed: 4 additions & 7 deletions

File tree

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
PYTHON ?= python
2-
IPYTHON ?= ipython
32

43
.PHONY: test
54

@@ -15,5 +14,3 @@ test:
1514
$(PYTHON) test/test_import.py
1615
$(PYTHON) test/test_memory_usage.py
1716
$(PYTHON) test/test_precision_import.py
18-
$(IPYTHON) test/test_ipython.py
19-

memory_profiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ def choose_backend(new_backend=None):
10771077
('tracemalloc', has_tracemalloc),
10781078
('no_backend', True)
10791079
]
1080-
backends_indices = {b[0]: i for i, b in enumerate(all_backends)}
1080+
backends_indices = dict((b[0], i) for i, b in enumerate(all_backends))
10811081

10821082
if new_backend is not None:
10831083
all_backends.insert(0, all_backends.pop(backends_indices[new_backend]))

test/test_gen.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ def my_func():
1010
@profile
1111
def test_comprehension():
1212
# Dict comprehension
13-
d_comp = {str(k*k): [v] * (1<<17)
14-
for (v, k) in enumerate(range(99, 111))}
13+
d_comp = dict((str(k*k), [v] * (1<<17))
14+
for (v, k) in enumerate(range(99, 111)))
1515

1616
# List comprehension
1717
l_comp = [[i] * (i<<9) for i in range(99)]
@@ -20,7 +20,7 @@ def test_comprehension():
2020

2121
def hh(x=1):
2222
# Set comprehension
23-
s_comp = {('Z',) * (k<<13) for k in range(x, 19 + 2*x)}
23+
s_comp = set(('Z',) * (k<<13) for k in range(x, 19 + 2*x))
2424
return s_comp
2525

2626
val = [range(1, 4), max(1, 4), 42 + len(hh())]

0 commit comments

Comments
 (0)