# \[bug?\] Append takes 2 arguements(2 given)?

**URL:** <https://forum.inductiveautomation.com/t/bug-append-takes-2-arguements-2-given/25079>\
**Category:** Ignition Early Access\
**Created:** [May 16, 2019, 6:16pm UTC](https://forum.inductiveautomation.com/t/bug-append-takes-2-arguements-2-given/25079 "2019-05-16T18:16:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [May 16, 2019, 6:16pm UTC](https://forum.inductiveautomation.com/t/bug-append-takes-2-arguements-2-given/25079/1 "2019-05-16T18:16:18Z")

</div>

I’m not sure if I’m just going about it wrong or if there is a bug, but I’m trying to append data into a new dataset, but I’m getting the following error whenever I try to run .append() on it. Any Ideas?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/822a06a2daa83f1fadb60a34a6f6d43bb887ab2a.png)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [May 16, 2019, 6:18pm UTC](https://forum.inductiveautomation.com/t/bug-append-takes-2-arguements-2-given/25079/2 "2019-05-16T18:18:25Z")

</div>

Huh, AFAIK python’s list append() takes 1 arg…

---

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [May 16, 2019, 6:21pm UTC](https://forum.inductiveautomation.com/t/bug-append-takes-2-arguements-2-given/25079/3 "2019-05-16T18:21:16Z")

</div>

Yeah I just noticed I was missing my square braces around my data I was appending. Error is confusing, but it seems to work now.

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [May 16, 2019, 6:21pm UTC](https://forum.inductiveautomation.com/t/bug-append-takes-2-arguements-2-given/25079/4 "2019-05-16T18:21:36Z")

</div>

You can also do `newData.extend(["test","test"])`

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 16, 2019, 6:36pm UTC](https://forum.inductiveautomation.com/t/bug-append-takes-2-arguements-2-given/25079/5 "2019-05-16T18:36:37Z")

</div>

Python background/internals lesson:  
newData.append() is calling the `append` function on `newData`, which is an instance of the `list` class, which in pseudocode looks something like:

```auto
class list(object):
    def append(self, item):
        <add an item to internal data storage>

```

So it’s saying it needs 2 arguments because it does - `self`, and `item` - it’s just that `self` is automatically passed when you call it on an object reference.

As @jpark pointed out, if you want to add multiple items in one call, just use `extend`.
