ó FRTc@s0defd„ƒYZdefd„ƒYZdS(t ResultSetcBs\eZdZdd„Zed„ƒZd„Zd„Zd„Z e Z d„Z d„Z RS( s¼ A class used to lazily handle page-to-page navigation through a set of results. It presents a transparent iterator interface, so that all the user has to do is use it in a typical ``for`` loop (or list comprehension, etc.) to fetch results, even if they weren't present in the current page of results. This is used by the ``Table.query`` & ``Table.scan`` methods. Example:: >>> users = Table('users') >>> results = ResultSet() >>> results.to_call(users.query, username__gte='johndoe') # Now iterate. When it runs out of results, it'll fetch the next page. >>> for res in results: ... print res['username'] cCsqtt|ƒjƒd|_g|_i|_g|_d|_t |_ d|_ d|_ ||_ d|_dS(Niÿÿÿÿi(tsuperRt__init__tNonet the_callablet call_argst call_kwargst_resultst_offsettTruet _results_leftt_last_key_seent_fetchest_max_page_sizet_limit(tselft max_page_size((sC/opt/freeware/lib/python2.7/site-packages/boto/dynamodb2/results.pyRs         cCsdS(Ntexclusive_start_key((R((sC/opt/freeware/lib/python2.7/site-packages/boto/dynamodb2/results.pyt first_key$scCsg|_d|_dS(sº Resets the internal state of the ``ResultSet``. This prevents results from being cached long-term & consuming excess memory. Largely internal. iN(RR(R((sC/opt/freeware/lib/python2.7/site-packages/boto/dynamodb2/results.pyt_reset(s cCs|S(N((R((sC/opt/freeware/lib/python2.7/site-packages/boto/dynamodb2/results.pyt__iter__4scCsè|jd7_|jt|jƒkry|jtkrBtƒ‚n|jƒx*t|jƒ ru|jru|jƒqOWn|jt|jƒkrÛ|jdk rÍ|jd8_|jdkrÍtƒ‚qÍn|j|jStƒ‚dS(Nii( RtlenRR tFalset StopIterationt fetch_moreRR(R((sC/opt/freeware/lib/python2.7/site-packages/boto/dynamodb2/results.pyt__next__7s  cOsyt|ƒstdƒ‚n|jddƒ|_|jdk rZ|jdkrZd|_n||_||_||_dS(sê Sets up the callable & any arguments to run it with. This is stored for subsequent calls so that those queries can be run without requiring user intervention. Example:: # Just an example callable. >>> def squares_to(y): ... for x in range(1, y): ... yield x**2 >>> rs = ResultSet() # Set up what to call & arguments. >>> rs.to_call(squares_to, y=3) s3You must supply an object or function to be called.tlimitiN(tcallablet ValueErrortpopRRRRR(RRtargstkwargs((sC/opt/freeware/lib/python2.7/site-packages/boto/dynamodb2/results.pytto_callSs     cCs–|jƒ|j}|jjƒ}|jdk rE|j||js¦