Content-Length: 301409 | pFad | https://github.com/python/cpython/issues/124502

11 [C API] Add PyUnicode_Equal() function · Issue #124502 · python/cpython · GitHub
Skip to content

[C API] Add PyUnicode_Equal() function #124502

@vstinner

Description

@vstinner

Python 3.13 moved the private _PyUnicode_EQ() function to internal C API. mypy and Pyodide are using it.

I propose to add a public PyUnicode_Equal(a, b) function to the limited C API 3.14 to replace the private _PyUnicode_EQ() function:

  • Return 1 if a is equal to b.
  • Return 0 if a is not equal to b.
  • Set a TypeError exception and return -1 if a or b is not a Python str object.
  • The function always succeed if a and b are strings.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/124502

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy