Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Def kw arg default value incorrect when negative #26

Closed
sqlalchemy-bot opened this issue Mar 12, 2007 · 2 comments
Closed

Def kw arg default value incorrect when negative #26

sqlalchemy-bot opened this issue Mar 12, 2007 · 2 comments

Comments

@sqlalchemy-bot
Copy link

@sqlalchemy-bot sqlalchemy-bot commented Mar 12, 2007

Migrated issue, originally created by Anonymous

Looks like the lexer is passing over the sign for keyword args with a negative default value.

Template:
<%def name="test(x=-1)">
${x}
</%def>

Compiled:
def test(x=1):
return render_test(context.locals_(__locals),x)

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Mar 13, 2007

Michael Bayer (@zzzeek) wrote:

one tricky section of mako is that we have to re-generate python expressions using AST traversal. so a lot of nodes were missing. I think i have just about all of them that would be in an expression in [changeset:235], including UnarySub which fixes this.

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Mar 13, 2007

Changes by Michael Bayer (@zzzeek):

  • changed status to closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.