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.ke...@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 :)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to