Home Download Buy Blog Forum Support

Python function

Python function

Postby blot on Sat Mar 24, 2012 3:36 am

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.
Posts: 7
Joined: Fri Feb 10, 2012 10:38 am

Re: Python function

Postby tito on Sat Mar 24, 2012 5:56 am

One character to the left and you get "entity.name.function.pyton.invalid.illegal.name.python"
Give APIs, let the community build the rest!
Posts: 991
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Re: Python function

Postby agibsonsw on Sat Mar 24, 2012 10:38 am

break and continue are Python reserved/keywords and should not be used as function or variable names.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

Return to Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 13 guests