◐ Shell
clean mode source ↗

gh-115754: Use Py_GetConstant(Py_CONSTANT_EMPTY_STR) by vstinner · Pull Request #125583 · python/cpython

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@vstinner

@vstinner vstinner commented

Oct 16, 2024

edited by bedevere-app Bot

Loading

Copy link Copy Markdown

Member

Replace PyUnicode_FromStringAndSize(NULL, 0)
with Py_GetConstant(Py_CONSTANT_EMPTY_STR).

Replace PyUnicode_FromStringAndSize(NULL, 0)
with Py_GetConstant(Py_CONSTANT_EMPTY_STR).

@rruuaanng

Copy link Copy Markdown

Contributor

LGTM, Looks very readable :)

@vstinner vstinner merged commit ebcc578 into python:main

Oct 25, 2024

@vstinner vstinner deleted the empty_str2 branch

October 25, 2024 09:14

ebonnal pushed a commit to ebonnal/cpython that referenced this pull request

Jan 12, 2025
…5583)

Replace PyUnicode_FromStringAndSize(NULL, 0)
with Py_GetConstant(Py_CONSTANT_EMPTY_STR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@pganssle pganssle Awaiting requested review from pganssle pganssle is a code owner

@abalkin abalkin Awaiting requested review from abalkin

1 more reviewer

@rruuaanng rruuaanng rruuaanng approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@vstinner @rruuaanng