Edgewall Software

Ticket #42 (closed defect: fixed)

Opened 8 years ago

Last modified 20 months ago

Fix eval of *args and **kwargs in eval.py

Reported by: davidf@… Owned by: cmlenz
Priority: major Milestone: 0.3
Component: Expression evaluation Version: 0.2
Keywords: Cc:

Description

Using py:content="foo(*bar)" or py:content="foo(**bar)" generated an error by passing the string "bar" to the visit function rather than Name(bar):

AttributeError: 'ExpressionASTTransformer' object has no attribute 'visitstr'

This is because node.star_args and node.dstar_args are not lists. Patch with tests and fix attached.

Attachments

eval-fix-star-and-dstar-expr.patch Download (1.7 KB) - added by davidf@… 8 years ago.
patch to fix eval of *args and **kwargs, with tests

Change History

Changed 8 years ago by davidf@…

patch to fix eval of *args and **kwargs, with tests

Changed 8 years ago by cmlenz

  • status changed from new to assigned
  • version changed from devel to 0.2

Good catch, thanks for the patch!

Changed 8 years ago by cmlenz

  • status changed from assigned to closed
  • resolution set to fixed

Applied in [253].

Add/Change #42 (Fix eval of *args and **kwargs in eval.py)

Author


E-mail address and user name can be saved in the Preferences.


Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.