#NEWLINE# def limit( self , v ) : #NEWLINE# #INDENT# "\n        Limits the number of results returned by Cassandra. Use *0* or *None* to disable.\n\n        *Note that CQL's default limit is 10,000, so all queries without a limit set explicitly will have an implicit limit of 10,000*\n\n        .. code-block:: python\n\n            # Fetch 100 users\n            for user in User.objects().limit(100):\n                print(user)\n\n            # Fetch all users\n            for user in User.objects().limit(None):\n                print(user)\n        " #NEWLINE# if ( v is None ) : #NEWLINE# #INDENT# v = 0 #NEWLINE# #UNINDENT# if ( not isinstance ( v , six . integer_types ) ) : #NEWLINE# #INDENT# raise TypeError #NEWLINE# #UNINDENT# if ( v == v . _limit ) : #NEWLINE# #INDENT# return self #NEWLINE# #UNINDENT# if ( v < 0 ) : #NEWLINE# #INDENT# raise QueryException ( 'Negative limit is not allowed' ) #NEWLINE# #UNINDENT# clone = copy . deepcopy ( self ) #NEWLINE# clone . _limit = v #NEWLINE# return clone