Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #29368

Re: Batching HTTP requests with httplib (Python 2.7)

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <xavier.combelle@free.fr>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status UNSURE 0.272
X-Spam-Level **
X-Spam-Evidence '*H*': 0.60; '*S*': 0.15; 'subject:Python': 0.05; 'subject:2.7': 0.09; 'eval': 0.16; 'subject:requests': 0.16; '\xe9crit': 0.16; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'skip:( 20': 0.28; 'to:addr:python-list': 0.33; 'really': 0.36; 'received:fr': 0.36; 'subject:with': 0.36; 'subject: (': 0.36; 'bad': 0.37; 'subject:: ': 0.38; 'skip:l 20': 0.38; 'instead': 0.39; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'received:80.12': 0.65; 'received:80.12.242.128': 0.84; 'received:smtp.smtpout.orange.fr': 0.84; 'received:smtpout.orange.fr': 0.84; 'safer': 0.91; 'received:80.12.242': 0.93; 'received:orange.fr': 0.93
Date Fri, 14 Sep 2012 13:46:38 +0200
From Xavier Combelle <xavier.combelle@free.fr>
User-Agent Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120827 Thunderbird/15.0
MIME-Version 1.0
To python-list@python.org
Subject Re: Batching HTTP requests with httplib (Python 2.7)
References <k2t90g$4e4$1@speranza.aioe.org> <mailman.659.1347589892.27098.python-list@python.org> <k2uurd$re8$1@speranza.aioe.org> <CA+vVgJUiA-G9=27S6gAu9db3iPBd4dJYD5GMQBJg=A9ZidYW4w@mail.gmail.com>
In-Reply-To <CA+vVgJUiA-G9=27S6gAu9db3iPBd4dJYD5GMQBJg=A9ZidYW4w@mail.gmail.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 8bit
X-Mailman-Approved-At Mon, 17 Sep 2012 09:31:28 +0200
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.826.1347867090.27098.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1347867090 news.xs4all.nl 6855 [2001:888:2000:d::a6]:37419
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:29368

Show key headers only | View raw


instead of

Le 14/09/2012 12:56, Dwight Hutto a écrit :
> service_num_list = [num for num in range(0,5)]
> for service_num in service_num_list:
> 	eval("web_service_call%i(%i)" % (service_num,service_num))
>
>
service_num_list = [num for num in range(0,5)]
for service_num in service_num_list:
	locals()["web_service_call%i" % (service_num,)](service_num)

would be safer eval is really bad

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Batching HTTP requests with httplib (Python 2.7) Chicken McNuggets <chicken@mcnuggets.com> - 2012-09-13 19:34 +0100
  Re: Batching HTTP requests with httplib (Python 2.7) Cameron Simpson <cs@zip.com.au> - 2012-09-14 12:31 +1000
    Re: Batching HTTP requests with httplib (Python 2.7) Chicken McNuggets <chicken@mcnuggets.com> - 2012-09-14 10:53 +0100
      Re: Batching HTTP requests with httplib (Python 2.7) Dwight Hutto <dwightdhutto@gmail.com> - 2012-09-14 06:56 -0400
      Re: Batching HTTP requests with httplib (Python 2.7) Cameron Simpson <cs@zip.com.au> - 2012-09-15 19:30 +1000
      Re: Batching HTTP requests with httplib (Python 2.7) Xavier Combelle <xavier.combelle@free.fr> - 2012-09-14 13:46 +0200
        Re: Batching HTTP requests with httplib (Python 2.7) Neil Cerutti <neilc@norwich.edu> - 2012-09-18 12:40 +0000

csiph-web