Re: I tried erlang-ish [1|2] in python and something came out...

2008-09-21 Thread Chris Rebert
On Sun, Sep 21, 2008 at 10:02 AM, process <[EMAIL PROTECTED]> wrote: > In erlang you can cons like this: [1|2]. i tried this in python and it > didnt raise an error but i dont know what the result do In Python, like in C, the "|" operator on integers performs a bitwise-OR. To "cons" nondestructive

Re: I tried erlang-ish [1|2] in python and something came out...

2008-09-21 Thread Gary Herron
process wrote: In erlang you can cons like this: [1|2]. i tried this in python and it didnt raise an error but i dont know what the result do In Python | is the logical bitwise-OR operator. Look at the binary representation of the numbers to understand it. Gary Herron [1|2]