easy question on parsing python: "is not None"

Discussion in 'Python' started by wheres pythonmonks, Aug 5, 2010.

  1. How does "x is not None" make any sense? "not x is None" does make sense.

    I can only surmise that in this context (preceding is) "not" is not a
    unary right-associative operator, therefore:

    x is not None === IS_NOTEQ(X, None)

    Beside "not in" which seems to work similarly, is there other
    syntactical sugar like this that I should be aware of?

    W
     
    wheres pythonmonks, Aug 5, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hazzard
    Replies:
    2
    Views:
    665
    Hazzard
    Apr 6, 2004
  2. Doug Fort
    Replies:
    5
    Views:
    290
    Doug Fort
    Aug 6, 2004
  3. alf
    Replies:
    9
    Views:
    414
  4. Bruno Desthuilliers
    Replies:
    5
    Views:
    402
    Bruno Desthuilliers
    Aug 29, 2007
  5. wheres pythonmonks

    Re: easy question on parsing python: "is not None"

    wheres pythonmonks, Aug 5, 2010, in forum: Python
    Replies:
    5
    Views:
    263
    Dennis Lee Bieber
    Aug 8, 2010
Loading...

Share This Page