From: Jonathan Leighton Date: 2006-01-02T10:11:55+09:00 Subject: Re: Can't change the value of self On Mon, 2006-01-02 at 09:47 +0900, Hal Fulton wrote: > James Britt wrote: > > Jonathan Leighton wrote: > > > >> Can't change the value of self (SyntaxError) > >> self = round_to *args > >> > >> Why doesn't it work? What can I do instead? > > > > > > "Destructive" methods must alter self using that self's existing > > destructive methods. > > To which we should add: Time has no destructive methods, since > Time objects are immutable. > > But someone once created a MutableTime class -- anyone recall > who/when/where and whether it's complete? Thanks for the replies. Why is Time immutable (presumably it's deliberately designed like that)? The MutableTime class sounds interesting but it's probably overkill for what I wanted to do -- I'll just modify variables at a higher level. Thanks -- Jonathan Leighton http://turnipspatch.com/ | http://jonathanleighton.com/ | http://digital-proof.org/