parameters: (thelist, n)
return_statement: return newlists
docstring: Break a list into ``n`` sized peices
  	``partition_by(range(10), 3)`` gives::
  
  		[[1, 4, 7],
  		 [2, 5, 8],
  		 [3, 6, 9],
  		 [10]]
docstring_summary: Break a list into ``n`` sized peices
  	``partition_by(range(10), 3)`` gives::
docstring_tokens: Break a list into n sized peices partition_by ( range ( 10 ) 3 ) gives ::
function: def partition_by(thelist, n):
  	"""
  	Break a list into ``n`` sized peices
  	``partition_by(range(10), 3)`` gives::
  
  		[[1, 4, 7],
  		 [2, 5, 8],
  		 [3, 6, 9],
  		 [10]]
  
  	"""
  	try:
  		n = int(n)
  		thelist = list(thelist)
  	except (ValueError, TypeError):
  		return [thelist]
  	rows = int(math.ceil(float(len(thelist)) / n))
  	newlists = [thelist[r * n : (r + 1) * n] for r in range(rows)]
  	return newlists
function_tokens: def partition_by ( thelist , n ) : try : n = int ( n ) thelist = list ( thelist ) except ( ValueError , TypeError ) : return [ thelist ] rows = int ( math . ceil ( float ( len ( thelist ) ) / n ) ) newlists = [ thelist [ r * n : ( r + 1 ) * n ] for r in range ( rows ) ] return newlists