Skip to content

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

@hiphamster

Description

@hiphamster

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]:

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions