Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.5] bpo-28598: Support __rmod__ for RHS subclasses of str in % string formatting operations #94

Merged
merged 4 commits into from
Feb 27, 2017
Merged

[3.5] bpo-28598: Support __rmod__ for RHS subclasses of str in % string formatting operations #94

merged 4 commits into from
Feb 27, 2017

Conversation

mjpieters
Copy link
Contributor

Backport of #51

Python/ceval.c Outdated
PyObject *res;
if (PyUnicode_CheckExact(dividend) && (
!PyUnicode_Check(divisor) || PyUnicode_CheckExact(divisor))) {
// fast path; string formatting, but not if the RHS is a str subclass
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we support // ... style comments in 3.5?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, no, I forgot about C89 vs C99. 3.5 still supports C89 only so the comment will have to be updated.

@serhiy-storchaka serhiy-storchaka changed the title [backport to 3.5] bpo-28598: Support __rmod__ for RHS subclasses of str in % string formatting operations [3.5] bpo-28598: Support __rmod__ for RHS subclasses of str in % string formatting operations Feb 27, 2017
@berkerpeksag berkerpeksag merged commit bc144f0 into python:3.5 Feb 27, 2017
@mjpieters mjpieters deleted the bpo28598_backport_3.5 branch March 1, 2017 16:56
akruis pushed a commit to akruis/cpython that referenced this pull request Sep 9, 2017
This commit makes calls to an initialiser method (__init__(self)) stackless,
if soft switching is enabled.

https://bitbucket.org/stackless-dev/stackless/issues/94
(grafted from dc2e43c1dbd20f279704c287eb0e2b69e0d14c7f and 43fa00988749)
akruis pushed a commit to akruis/cpython that referenced this pull request Sep 9, 2017
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.

5 participants