Ticket #688 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

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) (diff)

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

Changed 3 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

Changed 3 years ago by scoder

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

Changed 3 years ago by scoder

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