Skip to content

None is highlighted differently in Python 3 than in Python 2 #33

Closed

Description

@gotgenes

This plugin's syntax file treats None as a pythonBuiltinObj for Python 2, but as a pythonStatement for Python 3. This causes different highlighting for None in Python 2 versus Python 3, since pythonBuiltinObj maps to the Structure group, but pythonStatement maps to the Statement group.

  1. Why did this plugin's maintainers decide the highlighting group for None should be different between Python 2 and Python 3? I'm not aware of anything different in the behavior of None from Python 2 to Python 3.
  2. Doesn't None — a builtin constant — most logically map to the Constant group, rather than Structure or (especially) Statement? (The same goes for other builtin constants like True, False, etc.)

Activity

  1. hdima commented on Oct 31, 2015

    @hdima
    Owner

    The idea is to show differences in implementation of None. In Python 2 None is a built-in object/type and it was possible to assign to None prior to Python 2.4. In Python 3 None is a part of the grammar so it can be seen more as a statement. And the same goes for True and False.

  2. nfnty commented on Mar 3, 2017

    @nfnty

    This has been fixed over at the fork vim-python/python-syntax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions