Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Sivan Greenberg 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: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de LfRYp5YyzA6PfpX9BDpJhAzbRXb0J32d4EOkKGUaGPqA== Return-Path: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: Xref: csiph.com comp.lang.python:112103 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