Ticket #467 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years 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 3 years ago by robertwb

  • priority changed from major to critical

Changed 3 years ago by robertwb

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

Changed 3 years ago by scoder

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

Changed 3 years ago by scoder

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