Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #100379
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Ganesh Pal <ganesh1pal@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Calling a list of functions |
| Date | Sun, 13 Dec 2015 22:56:31 +0530 |
| Lines | 30 |
| Message-ID | <mailman.210.1450027598.12405.python-list@python.org> (permalink) |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| X-Trace | news.uni-berlin.de s7nGSxLwxu+/J4Uo+WU1ewZoCA7j568EZ1Mqhx5unCuw== |
| Return-Path | <ganesh1pal@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.019 |
| X-Spam-Evidence | '*H*': 0.96; '*S*': 0.00; 'skip:[ 20': 0.03; 'python': 0.10; '2.7': 0.13; 'def': 0.13; 'received:io': 0.16; 'received:psf.io': 0.16; 'try:': 0.18; 'team,': 0.18; 'to:name :python-list@python.org': 0.20; 'subject:list': 0.26; 'linux': 0.26; 'message-id:@mail.gmail.com': 0.27; 'function': 0.28; 'fine': 0.28; 'print': 0.30; 'code': 0.30; 'run': 0.33; 'except': 0.34; 'list': 0.34; 'received:google.com': 0.35; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'received:209': 0.38; 'test': 0.39; 'to:addr:python.org': 0.40; 'your': 0.60; 'share': 0.61; 'sample': 0.63 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=ClQNj9FdwSYEt2bhQyoF1mn1XZSAJGjVni/Wtox81PY=; b=BYzkEmVSIyyNTgi9xWhvaUd14VQYJnd1Ow8wuIstDlQRDz24gqVLapjPxQTPEITEOo 9qb1BuEWrz5g3DVuP97d7kxBcIOTew9i/wdfLFT3QFwKHy1r1Zwho7MEUlMtUQzaH0Oq 91pQaPE9pf/tJVWyqGOeFLb7h0JBzMjRoaM6D6eflBWDew0egZHqgH3ExIHXXt9JmZab SLDy5ARsMwi1VOTuVPSMuj1YU5N+eShfhoMcJgd4GDRotYo5K8p7GC8x7Uo6S+56UFT5 tNTMm1U8inGsGxuDOQYMA/MDSeA5eixhilTpfhIwv2pdXp+zDtv0t0pGrAkcl2BkVHVU YI7A== |
| X-Received | by 10.25.144.65 with SMTP id s62mr9550328lfd.104.1450027591460; Sun, 13 Dec 2015 09:26:31 -0800 (PST) |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Xref | csiph.com comp.lang.python:100379 |
Show key headers only | View raw
Hi Team,
Iam on linux and python 2.7 . I have a bunch of functions which I
have run sequentially .
I have put them in a list and Iam calling the functions in the list as
shown below , this works fine for me , please share your
opinion/views on the same
Sample code :
def print1():
print "one"
def print2():
print "two"
def print3():
print "three"
print_test = [print1(),print2(),print3()] //calling the function
for test in range(len(print_test)):
try:
print_test[test]
except AssertionError as exc:
Regards,
Ganesh
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Calling a list of functions Ganesh Pal <ganesh1pal@gmail.com> - 2015-12-13 22:56 +0530
Re: Calling a list of functions BartC <bc@freeuk.com> - 2015-12-13 17:38 +0000
Re: Calling a list of functions Grant Edwards <invalid@invalid.invalid> - 2015-12-13 17:41 +0000
Re: Calling a list of functions Steven D'Aprano <steve@pearwood.info> - 2015-12-14 13:43 +1100
Re: Calling a list of functions Chris Angelico <rosuav@gmail.com> - 2015-12-14 13:49 +1100
Re: Calling a list of functions Anand <abapat@gmail.com> - 2015-12-13 21:54 -0800
csiph-web