Implement 'slice' in a custom Python object

I needed to do this a little while back while making a pythonic circular list. There used to be a command called getslice but this was deprecated a good while ago and replaced with something (in my opinion) more elegent: slice objects.

Read all about it here! (this doco is a little old, but communicates the principles well)

Published: August 25 2011

  • category:
blog comments powered by Disqus