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

Fix use of % operator on string with multiple arguments #12883

Merged
merged 2 commits into from Jul 5, 2017

Conversation

Projects
None yet
3 participants
@bjodah
Member

bjodah commented Jul 3, 2017

This is a minor fix, but the incorrect format strings raised a TypeError:

TypeError: not enough arguments for format string

Don't know if we want this in for 1.1?

cc @asmeurer @siefkenj

@smichr

This comment has been minimized.

Show comment
Hide comment
@smichr

smichr Jul 4, 2017

Member

+1

Member

smichr commented Jul 4, 2017

+1

@@ -4015,7 +4015,7 @@ def a2idx(j, n=None):
if j < 0:
j += n
if not (j >= 0 and j < n):
raise IndexError("Index out of range: a[%s]" % (j,))
raise IndexError("Index out of range: a[%s]" % j)

This comment has been minimized.

@asmeurer

asmeurer Jul 4, 2017

Member

And also this one.

@asmeurer

asmeurer Jul 4, 2017

Member

And also this one.

This comment has been minimized.

@bjodah

bjodah Jul 5, 2017

Member

Really? I think j is guaranteed to be an integral type at this point?

@bjodah

bjodah Jul 5, 2017

Member

Really? I think j is guaranteed to be an integral type at this point?

This comment has been minimized.

@smichr

smichr Jul 5, 2017

Member

The mod is right here.

@smichr

smichr Jul 5, 2017

Member

The mod is right here.

This comment has been minimized.

@asmeurer

asmeurer Jul 5, 2017

Member

Oh you are right.

@asmeurer

asmeurer Jul 5, 2017

Member

Oh you are right.

@asmeurer asmeurer merged commit 428aca3 into sympy:1.1 Jul 5, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment