Commit d9973b89 authored by mouadh's avatar mouadh

Omit `len()` for indexing/slicing

parent 76643873
......@@ -74,10 +74,9 @@ class XmlaExecuteTools():
:return: tuple as list without -1
"""
for index, att in enumerate(tuple[::-1]):
for att in tuple[::-1]:
if att != -1:
return tuple[:len(tuple) - index]
return tuple[:tuple.index(att)+1]
return tuple
......
......@@ -57,17 +57,17 @@
).show();
});
</script>
<div id="output" style="display: none;">,Day,City,Licence,Amount,Count,Continent,Country,Company,Article,Year,Quarter,Month
0,"May 12,2010",Madrid,Personal,1,84,Europe,Spain,Crazy Development,olapy,2010,Q2 2010,May 2010
1,"May 13,2010",Barcelona,Personal,2,841,Europe,Spain,Crazy Development,olapy,2010,Q2 2010,May 2010
2,"May 14,2010",Paris,Personal,4,2,Europe,France,Crazy Development,olapy,2010,Q2 2010,May 2010
3,"May 15,2010",Lausanne,Personal,8,231,Europe,Switzerland,Crazy Development,olapy,2010,Q2 2010,May 2010
4,"May 16,2010",Lausanne,Corporate,16,4,Europe,Switzerland,Crazy Development,olapy,2010,Q2 2010,May 2010
5,"May 19,2010",Geneva,Corporate,128,13,Europe,Switzerland,Crazy Development,olapy,2010,Q2 2010,May 2010
6,"May 20,2010",New York,Corporate,256,12,America,United States,Crazy Development,olapy,2010,Q2 2010,May 2010
7,"May 21,2010",New York,Corporate,512,564,America,United States,Crazy Development,olapy,2010,Q2 2010,May 2010
8,"May 17,2010",Lausanne,Partnership,32,65,Europe,Switzerland,Crazy Development,olapy,2010,Q2 2010,May 2010
9,"May 18,2010",Zurich,Partnership,64,64,Europe,Switzerland,Crazy Development,olapy,2010,Q2 2010,May 2010
<div id="output" style="display: none;">,Day,City,Licence,Amount,Count,Company,Article,Continent,Country,Year,Quarter,Month
0,"May 12,2010",Madrid,Personal,1,84,Crazy Development,olapy,Europe,Spain,2010,Q2 2010,May 2010
1,"May 13,2010",Barcelona,Personal,2,841,Crazy Development,olapy,Europe,Spain,2010,Q2 2010,May 2010
2,"May 14,2010",Paris,Personal,4,2,Crazy Development,olapy,Europe,France,2010,Q2 2010,May 2010
3,"May 15,2010",Lausanne,Personal,8,231,Crazy Development,olapy,Europe,Switzerland,2010,Q2 2010,May 2010
4,"May 16,2010",Lausanne,Corporate,16,4,Crazy Development,olapy,Europe,Switzerland,2010,Q2 2010,May 2010
5,"May 17,2010",Lausanne,Partnership,32,65,Crazy Development,olapy,Europe,Switzerland,2010,Q2 2010,May 2010
6,"May 19,2010",Geneva,Corporate,128,13,Crazy Development,olapy,Europe,Switzerland,2010,Q2 2010,May 2010
7,"May 20,2010",New York,Corporate,256,12,Crazy Development,olapy,America,United States,2010,Q2 2010,May 2010
8,"May 21,2010",New York,Corporate,512,564,Crazy Development,olapy,America,United States,2010,Q2 2010,May 2010
9,"May 18,2010",Zurich,Partnership,64,64,Crazy Development,olapy,Europe,Switzerland,2010,Q2 2010,May 2010
</div>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment