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


Groups > comp.lang.python > #112103

usage of functools.partial in in parallelism

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Sivan Greenberg <sivan@vitakka.co>
Newsgroups comp.lang.python
Subject usage of functools.partial in in parallelism
Date Sun, 31 Jul 2016 00:15:25 +0300
Lines 15
Message-ID <mailman.61.1469913329.6033.python-list@python.org> (permalink)
References <CAMB+yF1pKty0nRBL3ujsoshZAsi=nG+E5JBW=HT_mabhbiiekQ@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de LfRYp5YyzA6PfpX9BDpJhAzbRXb0J32d4EOkKGUaGPqA==
Return-Path <sivan@vitakka.co>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; '(of': 0.07; 'invocation': 0.09; 'subject:skip:f 10': 0.09; 'python': 0.10; 'received:io': 0.16; 'received:psf.io': 0.16; 'spotted': 0.16; 'subject:usage': 0.16; 'to:name:python list': 0.16; '\xc2\xa0i': 0.16; "\xc2\xa0i'm": 0.16; 'differ': 0.18; 'all,': 0.20; '(the': 0.22; 'arguments': 0.22; 'code.': 0.23; 'wondering': 0.25; 'example': 0.26; 'message-id:@mail.gmail.com': 0.27; 'ups': 0.29; "i'm": 0.30; 'code': 0.30; "can't": 0.32; 'maybe': 0.33; 'received:google.com': 0.35; 'tasks': 0.35; 'to:addr:python-list': 0.36; 'method': 0.37; 'sure': 0.39; 'to:addr:python.org': 0.40; 'per': 0.62; 'different': 0.63; 'quicker': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=vitakka-co.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=QzTdtBUHGbEENs9GuF9tYDlWf/6xkhXpvwIzct9BRAM=; b=IBre98LIV2qB3wNzfQZKdjjsOGjNaXEBepsHdfGbjL7eXkjKnFz0xzCMKDm6TlVvLQ vyRM2SRlXy4vXU4cbWDoJOPuW73BcQ+yrRYrmLKSSuBrr3FjzmMmGaeEQsyZ+GHK8ZN0 4PZD+vG/TNGY9/Y0xpoZAdRK9YPPf1vd4uLtMuoJEIQvXNAaBEqcdLjbIxHFN/J72h7g aLKzqXl8PN2/+c60mQj9E/DS01gY7zAj7U9qdRaYR0wJnWi8swgOvxO28t0vDGASz3C5 KSyy7ZK5BtvKz5JjgMmM9TwpYOc/9pt1ZXB64zTWoyFKJn9iAtUqlKBVHPbf+rhg94Tw qmBg==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=QzTdtBUHGbEENs9GuF9tYDlWf/6xkhXpvwIzct9BRAM=; b=bqo9LFk1cIfvqb16den4+B/5TIC61frWrMtAXsop9isojM0W9bL4TuGqsM1H2ST/dH VraQzgiTNj0boGJhJxEo6tGZd9mHn3OLVBpxYZBGqgHttKSbl+ki9M1Fa8KMrHbMBG9k UNCyMxX4OIuzUzcIxFFupqVCBIrN7uJSRpoPAlhucmhZwkVLxnAyHsXiFlIaV+WpI8YA 1eQSr72l9reU7fOYepr+YR1n55gYYG9Q3kfOaXA8fkRMs9RFLKokb61EdePr8LMznxHX E36CXEMI4K6ZqhN87AbpnKbKVSLXIGImJ9S3dV6WOFDDpI3PL5xq21I97OkK0fgksvL/ dPdw==
X-Gm-Message-State AEkoouvfPm0pfW+/DjVwoHAvR97rm8/NIWpQb5Gmk6tx1Tj7vQd3ZxDprKMRjiQJJ1wvkZxJNvNPpPKJ8wMZ6A==
X-Received by 10.200.44.213 with SMTP id 21mr75391849qtx.91.1469913325924; Sat, 30 Jul 2016 14:15:25 -0700 (PDT)
X-Content-Filtered-By Mailman/MimeDel 2.1.22
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
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>
X-Mailman-Original-Message-ID <CAMB+yF1pKty0nRBL3ujsoshZAsi=nG+E5JBW=HT_mabhbiiekQ@mail.gmail.com>
Xref csiph.com comp.lang.python:112103

Show key headers only | View raw


Hi all,

 I'm wondering about the use of partial in writing parallel code. Is is it
quicker than re-evaluating arguments for a multiple session.get()'s method
with different , for example (of requests) ?

 Or maybe it is used to make sure the arguments differ per each invocation
? (the parallel invocation is supposedly using tasks / co-routine support
in Python 3.

 I can't publish the code I spotted that in.

 What are ups and downs of using them when are they in context?

-Sivan

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


Thread

usage of functools.partial in in parallelism Sivan Greenberg <sivan@vitakka.co> - 2016-07-31 00:15 +0300

csiph-web