#NEWLINE# def page( self , number ) : #NEWLINE# #INDENT# 'Returns a Page object for the given 1-based page number.' #NEWLINE# number = self . validate_number ( number ) #NEWLINE# bottom = ( ( number - 1 ) * self . per_page ) #NEWLINE# top = ( bottom + self . per_page ) #NEWLINE# if ( ( top + self . orphans ) >= self . count ) : #NEWLINE# #INDENT# top = self . count #NEWLINE# #UNINDENT# return Page ( self . object_list [ bottom : top ] , number , self )