Sublime Forum

Python function

#1

Hey, has anyone else noticed this odd coloring in python for functions named break or continue?

As far as I’ve noticed only continue and break are affected, and only if they’re preceded by a def. I’m using the default Python.tmLanguage shipped with build 2185. I checked the scope with ctrl+alt+shift+p and there’s nothing particular about the function’s scope which could explain the change in color.

0 Likes

#2

One character to the left and you get “entity.name.function.pyton.invalid.illegal.name.python”

0 Likes

#3

break and continue are Python reserved/keywords and should not be used as function or variable names.

0 Likes