Re: [Tutor] Octal confusion, please explain why. Python 3.2

2012-06-02 Thread Alan Gauld
On 02/06/12 12:29, Jordan wrote: think it is because they are transported around within python as a integer value, is this correct and if so why? Steven has already answered your issue but just to emphasise this point. Python stores all data as binary values in memory. Octal, decimal, hex are

Re: [Tutor] Octal confusion, please explain why. Python 3.2

2012-06-02 Thread Jordan
Thank you for the detailed answer, now I understand and I understand that each number format is an integer just with a different base and cosmetic appearance. On 06/02/2012 01:51 PM, Steven D'Aprano wrote: > Jordan wrote: >> Hello, first off I am using Python 3.2 on Linux Mint 12 64-bit. >> I am c

Re: [Tutor] Octal confusion, please explain why. Python 3.2

2012-06-02 Thread Steven D'Aprano
Jordan wrote: Hello, first off I am using Python 3.2 on Linux Mint 12 64-bit. I am confused as to why I can not successfully compare a variable that was created as an octal to a variable that is converted to an octal in a if statement yet print yields that they are the same octal value. Because