bpo-28598: Support __rmod__ for RHS subclasses of str in % string formatting operations by mjpieters · Pull Request #51 · python/cpython
…rations. When you use `'%s' % SubClassOfStr()`, where `SubClassOfStr.__rmod__` exists, the reverse operation is ignored as normally such string formatting operations use the `PyUnicode_Format()` fast path. This patch tests for subclasses of `str` first and picks the slow path in that case. Fixes issue28598.
berkerpeksag
changed the title
Support __rmod__ for RHS subclasses of str in % string formatting operations
bpo-28598: Support __rmod__ for RHS subclasses of str in % string formatting operations
This was referenced
jaraco pushed a commit that referenced this pull request
jaraco pushed a commit to jaraco/cpython that referenced this pull request
Back port latest changes to importlib.resources Closes python#51 See merge request python-devs/importlib_resources!55
oraluben pushed a commit to oraluben/cpython that referenced this pull request
…ython#51) * feat: store bb_test flag in frame to reload during resume * feat: bigger CACHE entries for everything, CACHE for JUMP_BACKWARD * nit: increase overallocate factor even more * feat: remove bb_flag/bb_test and use only the frame's
This was referenced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters