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


Groups > comp.lang.python > #103125 > unrolled thread

Re: Question on keyword arguments

Started byChris Angelico <rosuav@gmail.com>
First post2016-02-19 02:45 +1100
Last post2016-02-19 02:45 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#103125 — Re: Question on keyword arguments

FromChris Angelico <rosuav@gmail.com>
Date2016-02-19 02:45 +1100
SubjectRe: Question on keyword arguments
Message-ID<mailman.8.1455810339.2289.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web