New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in optimization of range #763
Comments
@dagss commented It should print 9, I think |
@dagss commented Note: This must be changed in the for in range-optimization, because "for 0 <= i < n" should have this semantics! |
@dagss changed milestone from |
@dagss changed owner from |
@robertwb changed resolution to Works as expected. Committed http://hg.cython.org/cython-devel/rev/620326b14c3f This is another reason to keep the for...from syntax though. |
@robertwb changed component from |
@robertwb commented This is a dupe of http://trac.cython.org/ticket/196, the above commit was for http://trac.cython.org/ticket/208. |
@dagss changed resolution from No, this is a different bug. Reopening. Also note that this ticket is assigned to Prajwal Suhas P; see http://thread.gmane.org/gmane.comp.python.cython.devel/4775 Magnus' patch was only for incrementing-one-to-far; this is about evaluating the endpoints to range once per loop. Also consider this test case:
|
@dagss commented That is; I get:
|
@dagss changed priority from |
@robertwb changed resolution to Finally resolved by http://trac.cython.org/ticket/243 |
This:
prints out
20
.Migrated from http://trac.cython.org/ticket/203
The text was updated successfully, but these errors were encountered: