Opened 4 years ago

Closed 4 years ago

#688 closed defect (fixed)

incorrect return values of optimised builtin functions/methods

Reported by: scoder Owned by: scoder
Priority: major Milestone: 0.15
Component: Python Semantics Keywords:
Cc:

Description (last modified by scoder)

In Python, calls to setattr() or some_list.sort() return None. When optimised in Cython, they return 0 on success or -1 on error instead. The 0 return value is visible to user code.

Plus, Cython currently fails to handle the return value in some cases, so using the return value as Python object can crash as the value may not even get coerced.

This was found in a CPython unit test which tests the return value.

Change History (3)

comment:1 Changed 4 years ago by scoder

  • Description modified (diff)
  • Summary changed from incorrect return values of optimised builtin methods like list.sort() to incorrect return values of optimised builtin functions/methods

comment:2 Changed 4 years ago by scoder

  • Owner set to scoder
  • Status changed from new to assigned

comment:3 Changed 4 years ago by scoder

  • Milestone changed from wishlist to 0.15
  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.