Skip to content

Conversation

@davidhewitt
Copy link
Member

This PR adds some improvements to PyBackedStr which I've wanted when using this type in pydantic-core:

  • add #[inline] to a bunch of the methods which are very thin wrappers around other operations
  • add as_str() method which does the same as the as_ref() and deref, just spelt more explicitly
  • add as_py_str() method which exposes the underlying Python str object (where possible)

@davidhewitt davidhewitt enabled auto-merge January 8, 2026 17:45
@davidhewitt davidhewitt added this pull request to the merge queue Jan 8, 2026
Merged via the queue into PyO3:main with commit f7fd609 Jan 8, 2026
43 checks passed
@davidhewitt davidhewitt deleted the more-pybackedstr branch January 8, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants