Ticket #184 (closed defect: invalid)
range behaves in an odd way with unsigned types
| Reported by: | dagss | Owned by: | robertwb |
|---|---|---|---|
| Priority: | critical | Milestone: | 0.11 |
| Component: | Code Generation | Keywords: | |
| Cc: |
Description
I was just bitten by this:
cdef unsigned i = 10
print range(-i, i)
for x in range(-i, i):
print "entered"
This will print out an empty list, and not enter the loop. This is odd, considered that
def f(int a, int b):
print a, b
cdef unsigned i
i = 10
f(-i, i)
will print out -10, 10.
Change History
Note: See
TracTickets for help on using
tickets.
