This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients mark.dickinson, mel
Date 2014-07-14.11:18:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1405336695.04.0.524928815128.issue21979@psf.upfronthosting.co.za>
In-reply-to
Content
Surprisingly, this is valid syntax.  Your first line is parsed as:

    0xf or (python is weird in ways)

Because `or` is short-circuiting, its right-hand operand (which is also valid syntactically, being a chained comparison) is never evaluated, so we don't see the `NameErrors` that you might expect.

    >>> python is weird in ways
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    NameError: name 'python' is not defined

Your second example is similar.  Closing as 'not a bug'.
History
Date User Action Args
2014-07-14 11:18:15mark.dickinsonsetrecipients: + mark.dickinson, mel
2014-07-14 11:18:15mark.dickinsonsetmessageid: <1405336695.04.0.524928815128.issue21979@psf.upfronthosting.co.za>
2014-07-14 11:18:15mark.dickinsonlinkissue21979 messages
2014-07-14 11:18:14mark.dickinsoncreate