Pygments

generic syntax highlighter


Ticket #393 (closed defect: wontfix)

Opened 13 months ago

Last modified 13 months ago

Python lexer does not always recognize 'next' correctly

Reported by: asmodai Owned by: gbrandl
Priority: major Milestone:
Component: lexers Keywords: python
Cc:

Description

As seen on http://werkzeug.pocoo.org/documentation/tutorial/ in Section 6 there is an entry for:

next = property(lambda x: url_for(x.endpoint, page=x.page + 1))

The next here is highlighted, whereas it shouldn't (at least mitsuhiko said it was not overshadowing the built-in).

Change History

Changed 13 months ago by mitsuhiko

That's not easily fixable. Not sure what to do with it.

In theory it should not highlight builtins if they are assigned a different meaning in a scope (due to function arguments or by saying file = "myfilename.txt")

Hard to fix, we would have to actually parse the code for that. I vote for wontfix.

Changed 13 months ago by gbrandl

  • status changed from new to closed
  • resolution set to wontfix

I agree wholeheartedly.

Note: See TracTickets for help on using tickets.