Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #50322
| X-Received | by 10.224.172.129 with SMTP id l1mr17163476qaz.4.1373446854472; Wed, 10 Jul 2013 02:00:54 -0700 (PDT) |
|---|---|
| X-Received | by 10.50.62.103 with SMTP id x7mr2883895igr.16.1373446854437; Wed, 10 Jul 2013 02:00:54 -0700 (PDT) |
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!t19no982564qam.0!news-out.google.com!f7ni1805qai.0!nntp.google.com!t19no1033084qam.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.lang.python |
| Date | Wed, 10 Jul 2013 02:00:54 -0700 (PDT) |
| In-Reply-To | <mailman.4476.1373408491.3114.python-list@python.org> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=41.133.9.223; posting-account=U0dbVAoAAAAjYT-0vWHIihwl62ZNLk9Z |
| NNTP-Posting-Host | 41.133.9.223 |
| References | <61751485-a298-403e-8b44-be7cf2504f0e@googlegroups.com> <CALwzidnfRrKkXbyn6q2-4qOik+byX=MtGBeeno9TX6=rqN79ag@mail.gmail.com> <mailman.4476.1373408491.3114.python-list@python.org> |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <db74cbbe-629a-4ddf-868e-70d5967cdb75@googlegroups.com> (permalink) |
| Subject | Re: Recursive class | can you modify self directly? |
| From | Russel Walker <russ.pobox@gmail.com> |
| Injection-Date | Wed, 10 Jul 2013 09:00:54 +0000 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Xref | csiph.com comp.lang.python:50322 |
Show key headers only | View raw
On Wednesday, July 10, 2013 12:20:47 AM UTC+2, Ian wrote:
> On Tue, Jul 9, 2013 at 4:18 PM, Ian Kelly <ian.g.kelly@gmail.com> wrote:
>
> > If you actually want to modify the current object, you would need to
>
> > do something like:
>
> >
>
> > def expand(self):
>
> > import copy
>
> > self.expr = Expr(self.expr, self.op, self.val)
>
> > self.op = choice('+-*/')
>
> > self.val = choice('12345')
>
>
>
> Minus the "import copy". I modified the code before sending and
>
> forgot to remove that.
Yes! This is exactly it. Thanks :)
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Recursive class | can you modify self directly? Russel Walker <russ.pobox@gmail.com> - 2013-07-09 15:01 -0700
Re: Recursive class | can you modify self directly? Ian Kelly <ian.g.kelly@gmail.com> - 2013-07-09 16:18 -0600
Re: Recursive class | can you modify self directly? Ian Kelly <ian.g.kelly@gmail.com> - 2013-07-09 16:20 -0600
Re: Recursive class | can you modify self directly? Russel Walker <russ.pobox@gmail.com> - 2013-07-10 02:00 -0700
Re: Recursive class | can you modify self directly? Dave Angel <davea@davea.name> - 2013-07-09 18:30 -0400
Re: Recursive class | can you modify self directly? Ethan Furman <ethan@stoneleaf.us> - 2013-07-09 15:19 -0700
Re: Recursive class | can you modify self directly? Russel Walker <russ.pobox@gmail.com> - 2013-07-10 01:58 -0700
Re: Recursive class | can you modify self directly? Terry Reedy <tjreedy@udel.edu> - 2013-07-10 15:33 -0400
Re: Recursive class | can you modify self directly? Russel Walker <russ.pobox@gmail.com> - 2013-07-10 13:09 -0700
Re: Recursive class | can you modify self directly? Russel Walker <russ.pobox@gmail.com> - 2013-07-10 15:50 -0700
Re: Recursive class | can you modify self directly? Ian Kelly <ian.g.kelly@gmail.com> - 2013-07-10 17:39 -0600
csiph-web