On Tue, Sep 25, 2012 at 8:37 AM, Ian Kelly <ian.g.ke...@gmail.com> wrote: > On Mon, Sep 24, 2012 at 4:14 PM, Chris Angelico <ros...@gmail.com> wrote: >> file.pos = 42 # Okay, you're at position 42 >> file.pos -= 10 # That should put you at position 32 >> foo = file.pos # Presumably foo is the integer 32 >> file.pos -= 100 # What should this do? > > Since ints are immutable, the language specifies that it should be the > equivalent of "file.pos = file.pos - 100", so it should set the file > pointer to 68 bytes before EOF.
Oh, I forgot that guaranteed equivalency. Well, at least it removes the ambiguity. I don't like it though. ChrisA -- http://mail.python.org/mailman/listinfo/python-list