Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #80223
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin1!goblin.stu.neva.ru!nntp.spacedump.net!usenetcore.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <robertomartinezp@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; 'subject:: [': 0.04; '-for': 0.05; 'subject:Python': 0.06; '*args,': 0.09; 'arguments': 0.09; 'subject:method': 0.09; 'subject:set': 0.09; 'cc:addr :python-list': 0.11; 'def': 0.12; '**kwds)': 0.16; '**kwds):': 0.16; 'runtime.': 0.16; 'subject:Dev': 0.16; 'wrote:': 0.18; 'subject:] ': 0.20; 'email addr:gmail.com>': 0.22; 'cc:addr:python.org': 0.22; 'either.': 0.24; 'skip': 0.24; 'define': 0.26; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'function': 0.29; 'ideal': 0.29; 'cc:2**2': 0.30; 'message- id:@mail.gmail.com': 0.30; 'informative': 0.31; 'names.': 0.31; 'workaround': 0.31; 'skip:_ 10': 0.34; 'could': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'method': 0.36; 'implement': 0.38; 'nov': 0.38; 'pm,': 0.38; 'called': 0.40; 'first': 0.61; 'different': 0.65; 'to:addr:gmail.com': 0.65 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=nZKFvX+q17vT1v5uVTvi/dgg8d7OL1lHtK6eMq4LAqg=; b=o79p1QzDyjACwJn1kYz/t0cUSAkB9lhuB19Z5fTb5scwfXquHBN8ue248JZovXa4Xg FqXXw7ujPrBLx/aXhiTjHe/2Cvjk/ZYUn6dT5guyXmprnIZARy3RfGCy3wstffdCNivo tNbbZQkClazIjKmcWstlbI6/1imsKMArilMPLzbUkXwquY1IGJHTg7rhtcy736PBNiWi Y3mEgezhSQRrquFwQEVbsAFFrwb0u4wZYOrvkC+/rv9dsu9Y3r91H/dbjTUD8wPUXfO/ tE60raCscjwepUUQGZIsRgwLf7HARMBQchE1pK94nkBx8ZYQQo0d7j977ZvmYgh6jRiD jrsQ== |
| X-Received | by 10.42.16.74 with SMTP id o10mr3333136ica.61.1415128544190; Tue, 04 Nov 2014 11:15:44 -0800 (PST) |
| MIME-Version | 1.0 |
| In-Reply-To | <CANc-5Uy6umBttv7PeztRYGSHhWvyVWDMsKCPnF51RSPG1Uurug@mail.gmail.com> |
| References | <CAF0TK51TKs+tw=u_rzrWVeSsDK7cOBt1Gcvq_izLfMObuDYNig@mail.gmail.com> <545919B6.7040007@stoneleaf.us> <CAF0TK52vw_SmqexN8RXyGs8GSKecPobK54ZqYPyKgRSSJy9zWw@mail.gmail.com> <CANc-5Uy6umBttv7PeztRYGSHhWvyVWDMsKCPnF51RSPG1Uurug@mail.gmail.com> |
| From | Roberto Martínez <robertomartinezp@gmail.com> |
| Date | Tue, 4 Nov 2014 20:15:24 +0100 |
| Subject | Re: [Python-Dev] Dinamically set __call__ method |
| To | Skip Montanaro <skip.montanaro@gmail.com> |
| Content-Type | multipart/alternative; boundary=20cf303ea7b4304be405070d4a4f |
| Cc | Python <python-list@python.org>, Nathaniel Smith <njs@pobox.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| 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> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.15468.1415128547.18130.python-list@python.org> (permalink) |
| Lines | 69 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1415128547 news.xs4all.nl 2952 [2001:888:2000:d::a6]:39296 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:80223 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On Tue, Nov 4, 2014 at 8:06 PM, Skip Montanaro <skip.montanaro@gmail.com> wrote: > > On Tue, Nov 4, 2014 at 1:01 PM, Roberto Martínez < > robertomartinezp@gmail.com> wrote: > >> The workaround of calling a different method inside __call__ is not valid >> for my case because I want to change the *signature* of the function also >> -for introspection reasons. > > > You could define __call__ like so: > > def __call__(self, *args, **kwds): > self._my_call(*args, **kwds) > This was my first approach, but it is not very informative to the user and I prefer to have arguments with descriptive names. We have to change __doc__ too, so this is not an ideal solution for me. I tried to implement __getattribute__, but is not called either. :( then set self._my_call at runtime. > > Skip > >
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: [Python-Dev] Dinamically set __call__ method Roberto Martínez <robertomartinezp@gmail.com> - 2014-11-04 20:15 +0100
csiph-web