package python.object;

import java.util.List;

public class PythonTuple extends PythonTraverse{
	private List<PythonObject> objects;
	
	public PythonTuple(List<PythonObject> objects){
		this.objects = objects;
	}
	
	public PythonObject get(int index){
		return objects.get(index);
	}
	
	@Override
	public PythonIterator iterator() {
		return new PythonIterator(objects);
	}
}
@@ -16,17 +16,134 @@
 object;%0A
+import java.python.error.ExceptionManager;%0Aimport java.python.error.UnsupportedException;%0Aimport java.util.ArrayList;
 %0A
-
 import j
@@ -485,9 +485,1496 @@
 ts);%0A%09%7D%0A
-%7D
+%09%0A%09    public List%3CPythonObject%3E getValue() %7B return objects; %7D%0A%0A    @Override%0A    public PythonObject apply(PythonObject second, String op)%0A    %7B%0A        switch (op)%7B%0A            case %22+%22:%0A                if(second instanceof PythonTuple) %7B%0A                    PythonTuple t = (PythonTuple) second;%0A                    ArrayList%3CPythonObject%3E arr = new ArrayList%3C%3E(getValue());%0A                    arr.addAll(t.getValue());%0A                    return new PythonTuple(arr);%0A                %7D%0A                break;%0A            case %22*%22:%0A                if(second instanceof PythonInteger) %7B%0A                    PythonInteger number = (PythonInteger) second;%0A                    ArrayList%3CPythonObject%3E arr = new ArrayList%3C%3E();%0A                    for (int i = 0; i %3C number.getValue(); i++)%0A                        arr.addAll(getValue());%0A                    return new PythonTuple(arr);%0A                %7D%0A                break;%0A            case %22and%22:%0A                return second;%0A            case %22or%22:%0A                return new PythonTuple(getValue());%0A        %7D%0A        ExceptionManager.getManager().add(new UnsupportedException(0, 0, %22Unsupported operation%22));%0A        return null;%0A    %7D%0A%0A    @Override%0A    public PythonObject apply(String op) %7B%0A        switch (op) %7B%0A            case %22not%22:%0A                return new PythonBoolean(false);%0A        %7D%0A        ExceptionManager.getManager().add(new UnsupportedException(0, 0, %22Unsupported operation%22));%0A        return null;%0A    %7D%0A%7D%0A

Update PythonTuple.java