Skip to content

Lambda Parsing Bug Fix

Compare
Choose a tag to compare
@gordonwatts gordonwatts released this 12 Feb 10:20
· 24 commits to master since this release
6e617ee

The engine that finds lambda's for translation in source code has received a major upgrade/change. It now uses the builtin python tokenize module.

  • This makes it much more robust when dealing with comments, new lines, and other oddities.
  • More safely checks are built in to catch mistakes in matching lambda expressions to the intended code.

There is one regression - which is caused because this code is more rigorous in how it treats the source code: Using the python \ continuation character means that the line is really treated as a single line. This was not the case with the previous version of the parser. This may cause some expressions that work now to fail upon upgrade. You can just change the argument name, use ( and ) around the whole expression to get rid of the continuation characters, etc. to get your code quickly working again. You'll get an exception if this happens suggesting one of these two approaches if your code is affected.

What's Changed

Full Changelog: 3.1.2...3.2