-1

This is what I am trying to Edit - https://stackoverflow.com/documentation/python/809/compatibility-between-python-3-and-python-2#

Look for True False or None

I noticed the versions are just mentioned but are not added as a markup so I tried doing the same however but it's popping up error Version is not valid in this context. Not sure What is causing that.

Sample Code which I formatted:

<!-- if version <Python 2.x> [gte > 2.0] -->
    True, False = False, True
    True   # False
    False  # True
<!-- end version if -->

You can't do this with `None` since Python 2.4.

<!-- if version <Python 2.x> [gte 2.4] -->
    None = None  # SyntaxError: cannot assign to None
<!-- end version if -->
2
  • 1
    gte > 2.0? Maybe remove the `>’?
    – Jed Fox
    Aug 31, 2016 at 10:51
  • yes that was the issue, thx
    – garg10may
    Aug 31, 2016 at 11:44

1 Answer 1

1

Your problem seems to be this line:

<!-- if version <Python 2.x> [gte > 2.0] -->

The problem is the > in [gte > 2.0]. To fix, replace with this line:

<!-- if version <Python 2.x> [gte 2.0] -->

Not the answer you're looking for? Browse other questions tagged .