Created
December 11, 2012 21:18
-
-
Save mbeale/4262206 to your computer and use it in GitHub Desktop.
Sample code change
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Turns this: | |
accounts = Account.all() | |
while accounts: | |
for account in accounts: | |
print 'Account: %s' % account | |
try: | |
accounts = accounts.next_page() | |
except PageError: | |
accounts = () | |
into this: | |
for account in Account.all(): | |
print 'Account: %s' % account |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment