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

sheet.row + acts as sheet.row += #199

Closed
hiphamster opened this issue Apr 11, 2020 · 1 comment
Closed

sheet.row + acts as sheet.row += #199

hiphamster opened this issue Apr 11, 2020 · 1 comment

Comments

@hiphamster
Copy link

I'm seeing an odd behavior, which looks like a bug to me.
I create a sheet with a row, then add a new row to that sheet using '+' syntax.

Expected:

Original sheet should not change, as i used '+' and not '+='

Actual:

Original sheet is modified, '+' appears to act as '+='

Here's an example in iPython shell:
`
[nav] In [82]: sheet_a = p.Sheet([['a','b','c']], name='new')

[ins] In [83]: sheet_a.row + ['d','e','f']
Out[83]:
new:
+---+---+---+
| a | b | c |
+---+---+---+
| d | e | f |
+---+---+---+

[ins] In [84]: sheet_a
Out[84]:
new:
+---+---+---+
| a | b | c |
+---+---+---+
| d | e | f |
+---+---+---+

[ins] In [85]: sheet_a.save_as('sheet_a.xls')

[ins] In [86]: sheet_b = p.get_sheet(file_name='sheet_a.xls')

[ins] In [87]: sheet_b
Out[87]:
new:
+---+---+---+
| a | b | c |
+---+---+---+
| d | e | f |
+---+---+---+

[ins] In [88]:

`

chfw added a commit that referenced this issue Apr 21, 2020
* ✨ return new instances for __add__ always. #199

* 💄 pump version number and update change log, etc.

* ✨ matrix __add__ to return new book

* 💚 fix travis config

* 💚 remove pypy, 2.7 and 3.5 build

* 💚 min test on python 3.6

* 💚 min test on python 3.6

* 💚 update minimum requirements

* 🔬 more tests for the newly coded feature

* 📚 update fair amount of documentation
@chfw
Copy link
Member

chfw commented Apr 21, 2020

pending for v0.6.0 release.

@chfw chfw closed this as completed Apr 21, 2020
@chfw chfw mentioned this issue Apr 21, 2020
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

No branches or pull requests

2 participants