Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4)

Issue 602: range: lean and mean (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 year, 6 months ago by Benjamin
Modified:
3 months, 1 week ago
Reviewers:
GvR
CC:
SVN Base:
http://svn.python.org/view/*checkout*/python/branches/py3k/
Visibility:
Public.

Description

Per discussions on Python-3000, I've stipped range down to a bare
minimum. Here's an overview of the patch:

1. No slicing.
2. Length is computed in constructor and is a PyLong in the object's
struct. __len__ simply tries to convert it to a Py_ssize_t.
3. start, stop, and, step are exposed as attributes

Patch Set 1

Total comments: 9

Patch Set 2 : use PyMemberDef

Total comments: 2

Patch Set 3 : in response to reviews

Total comments: 2

Patch Set 4 : __len__ is back!

Total comments: 3

Patch Set 5 : address more concerns

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Lib/ctypes/test/test_slicing.py View 4 2 chunks 39 lines 0 comments Download
Lib/test/pickletester.py View 4 1 chunk 13 lines 0 comments Download
Lib/test/seq_tests.py View 4 1 chunk 13 lines 0 comments Download
Lib/test/test_deque.py View 4 1 chunk 13 lines 0 comments Download
Lib/test/test_enumerate.py View 4 1 chunk 13 lines 0 comments Download
Lib/test/test_heapq.py View 4 1 chunk 13 lines 0 comments Download
Lib/test/test_mutants.py View 4 1 chunk 15 lines 0 comments Download
Lib/test/test_operator.py View 4 2 chunks 22 lines 0 comments Download
Lib/test/test_random.py View 4 3 chunks 33 lines 0 comments Download
Lib/test/test_range.py View 1 2 3 4 1 chunk 49 lines 0 comments Download
Lib/test/test_set.py View 4 3 chunks 31 lines 0 comments Download
Lib/test/test_trace.py View 4 2 chunks 22 lines 0 comments Download
Objects/rangeobject.c View 1 2 3 4 20 chunks 329 lines 0 comments Download

Messages

Total messages: 9
mvloewis_gmail.com
http://codereview.appspot.com/602/diff/1/21 File Objects/rangeobject.c (right): http://codereview.appspot.com/602/diff/1/21#newcode17 Line 17: PyObject *length; What is the purpose of caching ...
1 year, 6 months ago
GvR
http://codereview.appspot.com/602/diff/1/22 File Lib/test/test_range.py (right): http://codereview.appspot.com/602/diff/1/22#newcode72 Line 72: self.assertEqual(r.step, 1) I'd like the test to be ...
1 year, 6 months ago
GvR
Hey musiccomposition, can you add the second patch from the bug issue to this review ...
1 year, 6 months ago
Benjamin
http://codereview.appspot.com/602/diff/1/21 File Objects/rangeobject.c (right): http://codereview.appspot.com/602/diff/1/21#newcode17 Line 17: PyObject *length; On 2008/05/02 05:43:57, mvloewis wrote: > ...
1 year, 6 months ago
mvloewis_gmail.com
http://codereview.appspot.com/602/diff/141/83 File Objects/rangeobject.c (right): http://codereview.appspot.com/602/diff/141/83#newcode288 Line 288: range_members, /* tp_members */ Carrying forward from the ...
1 year, 6 months ago
GvR
Here are a few more comments, Benjamin. http://codereview.appspot.com/602/diff/243/183 File Lib/test/test_range.py (right): http://codereview.appspot.com/602/diff/243/183#newcode71 Line 71: self.assertEqual(r.step, ...
1 year, 6 months ago
Alexandre Vassalotti
http://codereview.appspot.com/602/diff/222/306 File Lib/test/pickletester.py (right): http://codereview.appspot.com/602/diff/222/306#newcode588 Line 588: oob = list(protocols)[-1] + 1 # a future ...
1 year, 6 months ago
Benjamin
one reply http://codereview.appspot.com/602/diff/222/302 File Lib/ctypes/test/test_slicing.py (right): http://codereview.appspot.com/602/diff/222/302#newcode23 Line 23: a[0:5] = list(range(5, 10)) On 2008/05/03 ...
1 year, 6 months ago
GvR
1 year, 4 months ago
Feel free to close this, the corresponding bug has been closed (rejected).
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r483