Ticket #467 (closed defect: fixed)

Opened 8 months ago

Last modified 5 months ago

cascaded assignments mixed with complete sequence assignments have side-effects

Reported by: scoder Owned by: scoder
Priority: blocker Milestone: 0.13
Component: Code Generation Keywords:
Cc:

Description

This code:

cdef int ai,bi
ai, bi = c = [intval(1), intval(2)]
print ai, bi, c

cdef int intval(int x):
    return x

evaluates intval() four times instead of twice: once when building the list and once when assigning to ai/bi.

Change History

Changed 6 months ago by robertwb

  • priority changed from major to critical

Changed 6 months ago by robertwb

  • priority changed from critical to blocker
  • milestone changed from 0.12.1 to 0.13

Changed 5 months ago by scoder

  • owner changed from somebody to scoder
  • status changed from new to assigned

Changed 5 months ago by scoder

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.