Skip to content

Implement a class for allowing combined string / number variables. #36

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

philippeitis
Copy link
Contributor

This is not a full implementation, but more of a starting point that supports const * (collection of strings). It would need to implement add the possible numerical operations before being merged.

This is intended to allow something like:

Polynomial(1, 2) * Polynomial('a', 'b')
>>> ax^2 + (2a + b)x + 2b

and hopefully:

a = Polynomial(1, 2) * Polynomial('a', 'b')
# To differentiable between a.b = 5 and a['b'] = 5.
a['b'] = 5
a
>>> ax^2 + (a + 10)x + 10

This is not a full implementation, but more of a starting point that supports const * (collection of strings). It would need to implement add the possible numerical operations before being merged.

This is intended to allow something like:

```
Polynomial(1, 2) * Polynomial('a', 'b')
>>> ax^2 + (2a + b)x + 2b
```

and hopefully:

```
a = Polynomial(1, 2) * Polynomial('a', 'b')
# To differentiable between a.b = 5 and a['b'] = 5.
a['b'] = 5
a
>>> ax^2 + (a + 10)x + 10
```
@pep8speaks
Copy link

Hello @philippeitis! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 702:1: E302 expected 2 blank lines, found 1
Line 731:17: E131 continuation line unaligned for hanging indent

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.

2 participants