#157 new
Vesselin Petkov

Python syntax highlighting is unconventional

Reported by Vesselin Petkov | January 6th, 2011 @ 09:11 PM

Syntax highlighting treats calls like definitions and doesn't match names in definitions without parentheses (like class definitions)

What I did:

Opened a .py file:

class MyClass:
    def __init__(self,):
        self.foo = 42
        self.bar()

    def bar(self,):
        print self.foo

What I expected to happen:

MyClass, init and bar to highlighted in similar color as names. self.foo and the self.bar() call to have similar color and 42 as a int to have a different color

What actually happened:

MyClass wasn't highlighted. bar() was highlighted on the self.bar() call line like in the definition

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

A text editor for Mac OS X

People watching this ticket

Pages