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


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

RE: Implementing append within a descriptor

Started by"Joseph L. Casale" <jcasale@activenetwerx.com>
First post2014-01-21 22:52 +0000
Last post2014-01-21 22:52 +0000
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: Implementing append within a descriptor "Joseph L. Casale" <jcasale@activenetwerx.com> - 2014-01-21 22:52 +0000

#64459 — RE: Implementing append within a descriptor

From"Joseph L. Casale" <jcasale@activenetwerx.com>
Date2014-01-21 22:52 +0000
SubjectRE: Implementing append within a descriptor
Message-ID<mailman.5825.1390344784.18130.python-list@python.org>
> 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

[toc] | [standalone]


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


csiph-web