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

Issue 602: range: lean and mean (Closed)

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

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

Messages

Total messages: 9
mvloewis
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 ...
2 months, 3 weeks 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 ...
2 months, 3 weeks ago
GvR
Hey musiccomposition, can you add the second patch from the bug issue to this review ...
2 months, 3 weeks 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: > ...
2 months, 3 weeks ago
mvloewis
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 ...
2 months, 3 weeks 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, ...
2 months, 3 weeks 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 ...
2 months, 3 weeks 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 ...
2 months, 3 weeks ago
GvR
1 month, 1 week 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
This is Rietveld r168