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


Groups > comp.lang.python > #64459

RE: Implementing append within a descriptor

Path csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <jcasale@activenetwerx.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.024
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; 'assignment': 0.07; 'append': 0.09; 'chris,': 0.16; 'inclined': 0.16; 'invisible': 0.16; 'received:172.18.0': 0.16; 'set,': 0.16; 'subclass': 0.16; 'hey': 0.18; 'trying': 0.19; 'to:name:python-list@python.org': 0.22; 'instead.': 0.24; 'header:Received:8': 0.24; 'header:In- Reply-To:1': 0.27; 'work.': 0.31; 'thanks!': 0.32; "i'd": 0.34; 'could': 0.34; 'but': 0.35; 'there': 0.35; 'are,': 0.36; 'charset :us-ascii': 0.36; 'two': 0.37; 'list': 0.37; 'to:addr:python- list': 0.38; 'list,': 0.38; 'to:addr:python.org': 0.39; 'either': 0.39; 'received:unknown': 0.61; "you're": 0.61; 'magical': 0.91
X-Cloudmark-SP-Filtered true
X-Cloudmark-SP-Result v=1.1 cv=/MiPqmMwFv6ha2ZBybe0ZU9m+O5sXPp7gEUgHVyRzyY= c=1 sm=1 a=b9msaFy8Sb4A:10 a=7PYXob_7ZXMA:10 a=AgG5ixNBvo4A:10 a=BLceEmwcHowA:10 a=kj9zAlcOel0A:10 a=xqWC_Br6kY4A:10 a=oNw28mxuUhXRB3mVwYQ4Ag==:17 a=8Nu0RI1C1JNdftSQErwA:9 a=CjuIK1q_8ugA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/simple; d=activenetwerx.com; s=default; t=1390344781; bh=gbF/jX2qfoLuEQPZLZ7ghJvahKxhRERO9qNAMfIPIPg=; h=From:To:Subject:Date:References:In-Reply-To; b=KHSGng+fQYOCsmYXxm/ksnUYfDcJ+so4ibDD2hlcH8omODhJepnMIuQ8m/tcHIHuZ NRHl2NBeb2ERNfe6Q6V74sPVb1nBdp5IEYNrn4Y8nwIZr+J//HN02bsdv7zh+/X4Gm 33jMlr9/3KHW4853zhM5IAsIAcyBs3YMhystYtwQ=
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/simple; d=activenetwerx.com; s=default; t=1390344781; bh=gbF/jX2qfoLuEQPZLZ7ghJvahKxhRERO9qNAMfIPIPg=; h=From:To:Subject:Date:References:In-Reply-To; b=KHSGng+fQYOCsmYXxm/ksnUYfDcJ+so4ibDD2hlcH8omODhJepnMIuQ8m/tcHIHuZ NRHl2NBeb2ERNfe6Q6V74sPVb1nBdp5IEYNrn4Y8nwIZr+J//HN02bsdv7zh+/X4Gm 33jMlr9/3KHW4853zhM5IAsIAcyBs3YMhystYtwQ=
X-Spam-Checker-Version SpamAssassin 3.3.1 (2010-03-16) on mail.activenetwerx.com
X-Spam-Level
X-Spam-Status No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=ham version=3.3.1
From "Joseph L. Casale" <jcasale@activenetwerx.com>
To "python-list@python.org" <python-list@python.org>
Subject RE: Implementing append within a descriptor
Thread-Topic Implementing append within a descriptor
Thread-Index AQHPFkbT1iwWrttJYk6Uyh/I1T8lopqOrizg
Date Tue, 21 Jan 2014 22:52:42 +0000
References <df4a5fa31f874be2a4270cad9b73c4f5@exch.activenetwerx.com> <CAPTjJmr50WZcLvjgm35dhOdr+SUxgnCd4SaaC-e3h8rFOhRPpA@mail.gmail.com>
In-Reply-To <CAPTjJmr50WZcLvjgm35dhOdr+SUxgnCd4SaaC-e3h8rFOhRPpA@mail.gmail.com>
Accept-Language en-US
Content-Language en-US
X-MS-Has-Attach
X-MS-TNEF-Correlator
x-originating-ip [172.18.0.201]
Content-Type text/plain; charset="us-ascii"
Content-Transfer-Encoding quoted-printable
MIME-Version 1.0
X-Virus-Scanned ClamAV using ClamSMTP
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.5825.1390344784.18130.python-list@python.org> (permalink)
Lines 13
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1390344784 news.xs4all.nl 2915 [2001:888:2000:d::a6]:45349
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:64459

Show key headers only | View raw


> You're going to have to subclass list if you want to intercept its
> methods. As I see it, there are two ways you could do that: when it's
> set, or when it's retrieved. I'd be inclined to do it in __set__, but
> either could work. In theory, you could make it practically invisible
> - just check to see if you're trying to __set__ a list, and if you
> are, set a magical list instead.
 
Hey Chris,
That actually is sufficient, assignment can be intercepted and retyped so
an append will accomplish what I need.

Thanks!
jlc

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


Thread

RE: Implementing append within a descriptor "Joseph L. Casale" <jcasale@activenetwerx.com> - 2014-01-21 22:52 +0000

csiph-web