Re: [Tutor] Can someone explain this to me please

2015-08-22 Thread eryksun
On Fri, Aug 21, 2015 at 1:04 PM, Jon Paris wrote: > > import sys > x = sys.maxsize > print ("Max size is: ", x) > y = (x + 1) > print ("y is", type(y), "with a value of", y) > > Produces this result: > > Max size is: 9223372036854775807 > y is with a value of 9223372036854775808 > > I was expect

Re: [Tutor] Can someone explain this to me please

2015-08-21 Thread Alan Gauld
On 21/08/15 19:04, Jon Paris wrote: Max size is: 9223372036854775807 y is with a value of 9223372036854775808 I was expecting it to error out The documentation says: --- sys.maxsize An integer giving the maximum value a variable of type Py_ssize_t can take. It’s usually

Re: [Tutor] Can someone explain this to me please

2015-08-21 Thread Laura Creighton
In a message of Fri, 21 Aug 2015 14:04:18 -0400, Jon Paris writes: >This code: > >import sys >x = sys.maxsize >print ("Max size is: ", x) >y = (x + 1) >print ("y is", type(y), "with a value of", y) > >Produces this result: > >Max size is: 9223372036854775807 >y is with a value of 9223372036854775

[Tutor] Can someone explain this to me please

2015-08-21 Thread Jon Paris
This code: import sys x = sys.maxsize print ("Max size is: ", x) y = (x + 1) print ("y is", type(y), "with a value of", y) Produces this result: Max size is: 9223372036854775807 y is with a value of 9223372036854775808 I was expecting it to error out but instead it produces a value greeter th