Edgewall Software

Opened 16 years ago

Closed 16 years ago

#292 closed defect (fixed)

Problems with function def arguments in python blocks

Reported by: Scott Wilson <scott@…> Owned by: cmlenz
Priority: major Milestone: 0.6
Component: Expression evaluation Version: devel
Keywords: Cc:

Description

There seem to be several problems with argument strings in function definitions inside python blocks.

I'm attaching a patch that corrects the handling of argument defaults. The defaults were getting applied to the first arguments rather than the last ones in the list.

I'm also attaching some tests that demonstrate that neither variable arguments nor keyword arguments work as far as I can tell.

Attachments (2)

astutils_defaults.diff (1.8 KB) - added by Scott Wilson <scott@…> 16 years ago.
Patch to astutils.c at r1003 for argument defaults
template_eval_tests.py (514 bytes) - added by Scott Wilson <scott@…> 16 years ago.
Tests for vararg and kwargs defs (failing)

Download all attachments as: .zip

Change History (3)

Changed 16 years ago by Scott Wilson <scott@…>

Patch to astutils.c at r1003 for argument defaults

Changed 16 years ago by Scott Wilson <scott@…>

Tests for vararg and kwargs defs (failing)

comment:1 Changed 16 years ago by cmlenz

  • Resolution set to fixed
  • Status changed from new to closed

Thanks for the patch and the tests! I've applied it in [1004], together with a fix for the varargs/kwargs problem.

Note: See TracTickets for help on using tickets.