Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[Bug #121965] 10 in xrange(10) returns 1

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


noreply at sourceforge

Nov 8, 2000, 7:11 AM

Post #1 of 4 (69 views)
Permalink
[Bug #121965] 10 in xrange(10) returns 1

Bug #121965, was updated on 2000-Nov-08 06:11
Here is a current snapshot of the bug.

Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: 10 in xrange(10) returns 1

Details: C:\Python20>python.exe
Python 2.0 (#8, Oct 24 2000, 15:02:23) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> 10 in xrange(10)
1
>>> 10 in range(10)
0
>>>

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=121965&group_id=5470


noreply at sourceforge

Nov 8, 2000, 7:27 AM

Post #2 of 4 (69 views)
Permalink
[Bug #121965] 10 in xrange(10) returns 1 [In reply to]

Bug #121965, was updated on 2000-Nov-08 06:11
Here is a current snapshot of the bug.

Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: None
Priority: 7
Summary: 10 in xrange(10) returns 1

Details: C:\Python20>python.exe
Python 2.0 (#8, Oct 24 2000, 15:02:23) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> 10 in xrange(10)
1
>>> 10 in range(10)
0
>>>

Follow-Ups:

Date: 2000-Nov-08 06:27
By: gvanrossum

Comment:
Simple end case bug in range_contains().
Another bug: it doesn't work right for negative strides.

Better add some test cases too!

Assigned to Fred since he checked the code in (so maybe he even wrote it :-).
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=121965&group_id=5470


noreply at sourceforge

Nov 8, 2000, 11:39 AM

Post #3 of 4 (70 views)
Permalink
[Bug #121965] 10 in xrange(10) returns 1 [In reply to]

Bug #121965, was updated on 2000-Nov-08 06:11
Here is a current snapshot of the bug.

Project: Python
Category: Core
Status: Closed
Resolution: Fixed
Bug Group: None
Priority: 9
Summary: 10 in xrange(10) returns 1

Details: C:\Python20>python.exe
Python 2.0 (#8, Oct 24 2000, 15:02:23) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> 10 in xrange(10)
1
>>> 10 in range(10)
0
>>>

Follow-Ups:

Date: 2000-Nov-08 06:27
By: gvanrossum

Comment:
Simple end case bug in range_contains().
Another bug: it doesn't work right for negative strides.

Better add some test cases too!

Assigned to Fred since he checked the code in (so maybe he even wrote it :-).
-------------------------------------------------------

Date: 2000-Nov-08 10:39
By: fdrake

Comment:
">" was used where ">=" should have been used; fixed in Objects/rangeobject.c revision 2.21.
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=121965&group_id=5470


noreply at sourceforge

Nov 8, 2000, 12:55 PM

Post #4 of 4 (70 views)
Permalink
[Bug #121965] 10 in xrange(10) returns 1 [In reply to]

Bug #121965, was updated on 2000-Nov-08 06:11
Here is a current snapshot of the bug.

Project: Python
Category: Core
Status: Closed
Resolution: Fixed
Bug Group: None
Priority: 9
Summary: 10 in xrange(10) returns 1

Details: C:\Python20>python.exe
Python 2.0 (#8, Oct 24 2000, 15:02:23) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> 10 in xrange(10)
1
>>> 10 in range(10)
0
>>>

Follow-Ups:

Date: 2000-Nov-08 06:27
By: gvanrossum

Comment:
Simple end case bug in range_contains().
Another bug: it doesn't work right for negative strides.

Better add some test cases too!

Assigned to Fred since he checked the code in (so maybe he even wrote it :-).
-------------------------------------------------------

Date: 2000-Nov-08 10:39
By: fdrake

Comment:
">" was used where ">=" should have been used; fixed in Objects/rangeobject.c revision 2.21.
-------------------------------------------------------

Date: 2000-Nov-08 11:55
By: fdrake

Comment:
Fixed containment test for negative steps in Objects/rangeobject.c revision 2.22.

Regression tests for containment test for both positive and negative step added in Lib/test/test_b2.py revision 1.20.
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=121965&group_id=5470

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.