The title explains itself, how to get 2 out of the object
slice(0,2)
The documentation is somewhat confusing, or it is the wrong one
>>> slice(0,2).__getattribute__('stop') 2 >>> slice(0,2).__getattribute__('start') 0