#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2004
    Posts
    17
    Rep Power
    0

    Is that really xor?


    is the

    Code:
     ^
    really xor (caret chater, shift 6)? It looks like it when i try it out in the shell but I can't really believe it.
  2. #2
  3. Commie Mutant Traitor
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jun 2004
    Location
    Alpharetta, GA
    Posts
    1,806
    Rep Power
    1570
    Yes, as explained in the Python Reference. The use of the caret for the exclusive-or operator is from C, and is used in many current languages; this contrasts with the use of the caret in Pascal for pointer dereference, and in the various derivatives of Basic which use it as the exponentiation operator (C and many of it's relatives lack such an operator; Python uses the double asterisk ('**') for exponentiation, following a similar operator in Fortran).
    Last edited by Schol-R-LEA; December 28th, 2004 at 02:56 AM.
    Rev First Speaker Schol-R-LEA;2 JAM LCF ELF KoR KCO BiWM TGIF
    #define KINSEY (rand() % 7) λ Scheme is the Red Pill
    Scheme in Short Understanding the C/C++ Preprocessor
    Taming Python A Highly Opinionated Review of Programming Languages for the Novice, v1.1

    FOR SALE: One ShapeSystem 2300 CMD, extensively modified for human use. Includes s/w for anthro, transgender, sex-appeal enhance, & Gillian Anderson and Jason D. Poit clone forms. Some wear. $4500 obo. tverres@et.ins.gov

IMN logo majestic logo threadwatch logo seochat tools logo