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

Make sympy.abc more understandable #9282

Merged

Conversation

toolforger
Copy link
Contributor

Generating symbols through the compiler is not understood by analysis tools,
so they will generate an error for every use of something imported from
sympy.abc.

Generating symbols through the compiler is not understood by analysis tools,
so they will generate an error for every use of something imported from
sympy.abc.
@toolforger toolforger force-pushed the make-sympy.abc-more-understandable branch from 0e6031d to 2dae440 Compare April 11, 2015 21:55
@toolforger
Copy link
Contributor Author

test_import reports 0.220456 +- 0.002123 before this change, 0.220669 +- 0.002250 after.
Error/warning count in Eclipse PyDev is 7752/3261 before, 7242/3261 after, a difference of -510/+1.

@smichr
Copy link
Member

smichr commented Apr 12, 2015

FYI: don't forget about the rage capability of symbols, too:

A, B, C, D, E, F, G, H, I, J, K, L, M = symbols('A:M')
N, O, P, Q, R, S, T, U, V, W, X, Y, Z = symbols('N:Z')
a, b, c, d, e, f, g, h, i, j, k, l, m = symbols('a:m')
n, o, p, q, r, s, t, u, v, w, x, y, z = symbols('n:z')

@toolforger
Copy link
Contributor Author

Ah, I didn't think about that.
I made it like a, b, c, d, e = symbols('a, b, c, d, e') because I wanted to show off how the right-hand side can be a copy of the left-hand side.

Comparing the approaches, it seems to me that 'a:m' is more elegant, 'a, b, c, d, e' is the better precedent. Barring aspects I overlooked, I prefer the precedent.

I added a comment in the code to explain that, so people will know why it's the way it is.
(That's just in case you agree, so you can review the wording right away.)

@toolforger toolforger changed the title Make sympy.abc more understandable [Needs next review] Make sympy.abc more understandable Apr 12, 2015
@jcrist
Copy link
Member

jcrist commented Apr 15, 2015

This looks fine to me. @smichr: thoughts?

@smichr
Copy link
Member

smichr commented Apr 15, 2015

+1

moorepants added a commit that referenced this pull request Apr 15, 2015
…ndable

[Needs next review] Make sympy.abc more understandable
@moorepants moorepants merged commit 7496dfd into sympy:master Apr 15, 2015
@toolforger toolforger changed the title [Needs next review] Make sympy.abc more understandable Make sympy.abc more understandable Apr 16, 2015
@toolforger toolforger deleted the make-sympy.abc-more-understandable branch May 3, 2015 16:19
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.

None yet

4 participants