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


Groups > comp.lang.python > #103125

Re: Question on keyword arguments

Path csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Subject Re: Question on keyword arguments
Date Fri, 19 Feb 2016 02:45:36 +1100
Lines 13
Message-ID <mailman.8.1455810339.2289.python-list@python.org> (permalink)
References <62136715E19142B6B318EA3A3DF04D40@OPTIPLEX990> <na4kut$ru8$1@ger.gmane.org> <7278ec3f250548b192ce2d95c6fa07c5@seaexchmbx03.olympus.F5Net.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de UXp77HaytF5+YvXF2vmziQTstjg+jG7Y/Zp/vaZQAzSg==
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'received:209.85.223': 0.03; 'subject:Question': 0.05; 'list?': 0.07; 'cc:addr:python- list': 0.09; 'collections': 0.09; 'def': 0.13; '2016': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'interest,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subclassing': 0.16; 'wrote:': 0.16; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'object.': 0.22; 'am,': 0.23; 'feb': 0.23; 'import': 0.24; 'header:In-Reply-To:1': 0.24; 'define': 0.27; 'fri,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'dan': 0.29; 'skip:_ 10': 0.32; 'class': 0.33; "skip:' 20": 0.34; 'received:google.com': 0.35; 'so,': 0.35; 'received:209.85': 0.36; 'subject:: ': 0.37; 'received:209': 0.38; 'why': 0.39; 'rather': 0.39; '...and': 0.84; 'chrisa': 0.84; 'to:none': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=St5WqYaTiUiYBHGcfrFy7MJY86oNypHUS4rIFF+qs8M=; b=OltOqWtlxQGlMzAh05Dx6IVJeAl6lOed7yXypNMposGjGDqKLAI7GvuSLDN2l1yUgL vCiciPnpf+dr6klppVaFLXPQEO9RaZuJ0hSLeYkPLJEdCEWvAickUxdg79U+qyLbwYeA yOLmzxsFSbGSbJXeyyRpMFfXlpg1NfW0INqrnBfwPnkrnybLeDU8G72wLELCF4DQXoJb ORBNZO8aaY1zVSmDy9k4cZQgZ3FVvIbkmsuUHqekZrDqD8euyQ+Jg9uZ7mJZpQu0ooUf nAdUMcxnGWpoXenSrqb7sGmQjahDx9Ujt61scuX91AC2DatjZ8kigbGihppHW3OUevF3 ZunQ==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc:content-type; bh=St5WqYaTiUiYBHGcfrFy7MJY86oNypHUS4rIFF+qs8M=; b=D1k3tBKhBP2B90fM6mQPwjKzSBKGOV3kRfbGpEYGPsr1OjnkG6pnOSXTtyWcnicRdM NKrrwza0YaWM0FZuysb4sJrg3fpFJmfGMEvnzdsp7v3DF86bPD8PK8E2vmxIOx7jiOW2 lBdj3ArXJzkjNyYybm5vHy9gHKO/f2z+4Qkhudn0lsb6w07SgLO4Egq5C6k5uV3wzCd1 Xg6Ia8h1PZtpxGrIDxQXEosY297idRQz2U0iuRLZiP9+YZKkpcDmTTczdR5yvucomk+Z 9OSxEgkFTcdjZaifAwcRezXqP991yS7N3oaM8T7R0cyO5TE6v0gbKUOQdCGG0kiuGtCm zyFg==
X-Gm-Message-State AG10YOQIE9AHZ9x5eK5Dw1cfBYzCLocw69IeTUeDCmHymjia/H0Yt/hYNarBmfVa0mTIG3b6R/t+Y+bLVMFOeQ==
X-Received by 10.107.14.73 with SMTP id 70mr9585734ioo.31.1455810336746; Thu, 18 Feb 2016 07:45:36 -0800 (PST)
In-Reply-To <7278ec3f250548b192ce2d95c6fa07c5@seaexchmbx03.olympus.F5Net.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21rc2
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:103125

Show key headers only | View raw


On Fri, Feb 19, 2016 at 2:39 AM, Dan Strohl <D.Strohl@f5.com> wrote:
> So, define a return object like:
>
> from collections import UserList
> class TestResponse(UserList):
>     def __str__(self):
>         return '\0xfe%s' % '\0xfe'.join(self.data)
>
> ...and return that object.

Out of interest, why UserList rather than simply subclassing list?

ChrisA

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


Thread

Re: Question on keyword arguments Chris Angelico <rosuav@gmail.com> - 2016-02-19 02:45 +1100

csiph-web