Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #60364
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <jeanpierreda@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.022 |
| X-Spam-Evidence | '*H*': 0.96; '*S*': 0.00; 'attribute': 0.07; 'http': 0.09; 'subject:()': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; '24,': 0.16; 'behave': 0.16; 'executed.': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'this:': 0.26; 'post': 0.26; 'skip:" 20': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'marc': 0.31; 'objects': 0.35; 'received:google.com': 0.35; 'accessing': 0.36; 'hi,': 0.36; 'nov': 0.38; 'first': 0.61; 'to:addr:gmail.com': 0.65; 'request.': 0.70; 'subject:skip:o 10': 0.84; '2013': 0.98 |
| 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=gUyiodoAnrByuPvc49iH+z+XgfMQBEQvFuPdo7WwL48=; b=nvlGnIJK4aAmXT/2aNh+4AOjmGBcYc41zYCWME7e4XoGx1Yzf7FrViQTF0N2bQ1GwQ KHdWoKndC1tfIQudWU9voinT+fMce3aGDjVqHK6o1zgaUabMysCnByti7ePhUq3i/e2w VEuzLLSy0ZX+Fxu523m23levF3B5l+zdRQrw0l1I4MCiWwAHEfQdkLSTPer12wW6mIjk BZs8OmBdM/hET0W/ck5z4udK045kjICiYtO/RPvGEGeQUqF+fmMrnQ1rRjXspEfNWxfj 3sK2AGXrrXwF1UjR4cgbDvodU3uO0zP/LxNxb8tyFMnZKSE6/2JaELPTm9VlrUdc1hHh 1apw== |
| X-Received | by 10.49.99.98 with SMTP id ep2mr38084318qeb.9.1385298296584; Sun, 24 Nov 2013 05:04:56 -0800 (PST) |
| MIME-Version | 1.0 |
| In-Reply-To | <CA+DCN_uqn5OukuZ5QWWjJCUTksaFw50L03ZU7uqdm4a6ZOn7CA@mail.gmail.com> |
| References | <CA+DCN_uqn5OukuZ5QWWjJCUTksaFw50L03ZU7uqdm4a6ZOn7CA@mail.gmail.com> |
| From | Devin Jeanpierre <jeanpierreda@gmail.com> |
| Date | Sun, 24 Nov 2013 05:04:16 -0800 |
| Subject | Re: Implement logic on object.attribute and object.attribute() |
| To | Marc Aymerich <glicerinu@gmail.com> |
| Content-Type | text/plain; charset=UTF-8 |
| Cc | "comp.lang.python" <python-list@python.org> |
| 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.3128.1385298299.18130.python-list@python.org> (permalink) |
| Lines | 12 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1385298299 news.xs4all.nl 15919 [2001:888:2000:d::a6]:49059 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:60364 |
Show key headers only | View raw
On Sun, Nov 24, 2013 at 4:52 AM, Marc Aymerich <glicerinu@gmail.com> wrote: > Hi, > I'm playing with python internals to make objects behave like this: > > if I access to "object.attribute" I want to return the result of an > HTTP GET request. However if i call "object.attribute()" I want an > HTTP POST request to be executed. Uh oh. What you want is impossible. You cannot call an attribute without first accessing it. :( -- Devin
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Implement logic on object.attribute and object.attribute() Devin Jeanpierre <jeanpierreda@gmail.com> - 2013-11-24 05:04 -0800
Re: Implement logic on object.attribute and object.attribute() Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-24 13:45 +0000
Re: Implement logic on object.attribute and object.attribute() Devin Jeanpierre <jeanpierreda@gmail.com> - 2013-11-24 06:04 -0800
Re: Implement logic on object.attribute and object.attribute() Chris Angelico <rosuav@gmail.com> - 2013-11-25 01:13 +1100
Re: Implement logic on object.attribute and object.attribute() Roy Smith <roy@panix.com> - 2013-11-24 09:21 -0500
Re: Implement logic on object.attribute and object.attribute() Chris Angelico <rosuav@gmail.com> - 2013-11-25 01:31 +1100
Re: Implement logic on object.attribute and object.attribute() Chris Angelico <rosuav@gmail.com> - 2013-11-25 01:13 +1100
Re: Implement logic on object.attribute and object.attribute() Marc Aymerich <glicerinu@gmail.com> - 2013-11-24 15:16 +0100
Re: Implement logic on object.attribute and object.attribute() Chris Angelico <rosuav@gmail.com> - 2013-11-25 01:37 +1100
Re: Implement logic on object.attribute and object.attribute() Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-24 15:11 +0000
Re: Implement logic on object.attribute and object.attribute() Marc Aymerich <glicerinu@gmail.com> - 2013-11-24 15:34 +0100
Re: Implement logic on object.attribute and object.attribute() Marc Aymerich <glicerinu@gmail.com> - 2013-11-24 15:48 +0100
Re: Implement logic on object.attribute and object.attribute() Chris Angelico <rosuav@gmail.com> - 2013-11-25 01:57 +1100
csiph-web