[web2py] Re: Problem slicing dal Rows

2011-03-26 Thread DenesL
Note that __getslice__ is used in: dal.py (3 times), html.py and languages.py On Mar 26, 5:25 pm, Massimo Di Pierro wrote: > Can you please send me a patch as an attachment?

[web2py] Re: Problem slicing dal Rows

2011-03-26 Thread Massimo Di Pierro
Can you please send me a patch as an attachment? On Mar 26, 3:13 pm, Kevin Ivarsen wrote: > It appears that Python's __getslice__(self, a, b) overload has a surprising > behavior. > Fromhttp://docs.python.org/reference/datamodel.html#object.__getslice__: > > "If negative indexes are used in the

[web2py] Re: Problem slicing dal Rows

2011-03-26 Thread Kevin Ivarsen
It appears that Python's __getslice__(self, a, b) overload has a surprising behavior. From http://docs.python.org/reference/datamodel.html#object.__getslice__: "If negative indexes are used in the slice, the length of the sequence is added to that index." So when you evaluate rows[-20:], Pytho