This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: [python-mode] Properly highlight lambda with no arguments
Type: enhancement Stage: test needed
Components: Demos and Tools Versions: Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: barry Nosy List: ajaksu2, amaury.forgeotdarc, barry, georg.brandl, rubyjoker
Priority: normal Keywords: patch

Created on 2007-08-12 19:05 by rubyjoker, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
lambda-with-no-arguments-highlighting.patch rubyjoker, 2007-08-12 19:05 review
lambda-with-no-arguments-highlighting-2.patch amaury.forgeotdarc, 2009-04-07 11:34 review
Messages (4)
msg53020 - (view) Author: Michal Kwiatkowski (rubyjoker) Date: 2007-08-12 19:05
Currently source highlighter in python-mode doesn't catch lambda forms without arguments, i.e. in:

function = lambda: 42

word "lambda" is not highlighted.

Attached patch fixes this issue by adding new rule to python-font-lock-keywords list. Patch against current trunk (r56963 now).
msg85684 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-04-07 04:04
Many changes have landed in Misc/python-mode.el since rev 56963, can
anyone confirm the described behavior?
msg85694 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2009-04-07 11:34
Yes, the behavior is the same with latest trunk.
I'd suggest this new patch though, it has the same effect but avoids a
new rule.
msg119287 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-10-21 13:02
python-mode.el is not maintained in Python anymore.
History
Date User Action Args
2022-04-11 14:56:25adminsetgithub: 45302
2010-10-21 13:02:28georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg119287

resolution: out of date
2009-04-07 11:42:53amaury.forgeotdarcsetassignee: barry

nosy: + barry
2009-04-07 11:34:30amaury.forgeotdarcsetfiles: + lambda-with-no-arguments-highlighting-2.patch
status: pending -> open

nosy: + amaury.forgeotdarc
messages: + msg85694
2009-04-07 04:04:00ajaksu2setstatus: open -> pending

type: enhancement
versions: + Python 2.7
nosy: + ajaksu2

messages: + msg85684
stage: test needed
2007-08-12 19:05:44rubyjokercreate