Skip to content

Commit

Permalink
retirando funcao desnecessaria de dentdo do laco
Browse files Browse the repository at this point in the history
  • Loading branch information
ramalho committed Dec 31, 2011
1 parent cd29bdc commit 271464e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions async/assincrono_clo.py
Expand Up @@ -38,15 +38,16 @@ def handle_request(response, index, nome):

http_client = httpclient.AsyncHTTPClient()

def buscar(index, nome):
def _buscar(request):
handle_request(request, index, nome)
return _buscar

with open('bandeiras.txt') as nomes:
ateh_b = takewhile(lambda s: s[0] in 'ab', nomes)
for index, nome in enumerate(ateh_b):
nome = nome.strip()
baixar.add(nome)
def buscar(index, nome):
def _buscar(request):
handle_request(request, index, nome)
return _buscar
http_client.fetch(BASE_URL+nome, buscar(index, nome))
qt_baixar = len(baixar)

Expand Down

0 comments on commit 271464e

Please sign in to comment.