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
Labels
bug Something isn't working lexer low priority

Comments

@sqlalchemy-bot
Copy link

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

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

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
Labels
bug Something isn't working lexer low priority
Projects
None yet
Development

No branches or pull requests

1 participant