Opened 16 years ago

Closed 15 years ago

#187 closed defect (fixed)

[Pyrex] c-code mis-interpretation

Reported by: joel Owned by: William Stein
Priority: minor Milestone: sage-2.10.1
Component: interfaces Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

I found a small bit of code that gets compiled incorrectly to c. A sample is:

def unlist():
        lst = [1,2]
        lst,m = lst

The translated c-code from this will produce an Unindexable exception. This results from the fact that the variable "lst" is bound to the first element of the list (the integer 1) before the second element is extracted from "lst". Hence it tries to unpack from the integer rather than the list.

Change History (2)

comment:1 Changed 15 years ago by Michael Abshoff

Milestone: sage-2.9

This is a rather old bug. We should verify that the problem still exists.

tagged for 2.9, hopefully to be resolved during Sage Bug Day 2.

Cheers,

Michael

comment:2 Changed 15 years ago by William Stein

Resolution: fixed
Status: newclosed

works for me now.

Note: See TracTickets for help on using tickets.