Vyper: Pass *args and **kwargs in function declaration

Created on 18 Mar 2019  路  2Comments  路  Source: vyperlang/vyper

Version Information

  • vyper Version (output of vyper --version): v0.1.0-beta.9
  • OS: linux
  • Python Version (output of python --version): Python 3.6.7
  • Environment (output of pip freeze): pycryptodome==3.7.3
    vyper==0.1.0b9

What's your issue about?

Is this a bug?
I can compile contract with *args and kwargs:
@public
def test1(a:uint256, *args,
kwargs) ->bool:
return True

And if i try to get args, for example, i''ll get following error "Undeclared variable: args"

How can it be fixed?

Check for * and ** in fun declaration

bug

Most helpful comment

@jacqueswww Maybe this highlights the case for a custom grammar. That kind of thing really should be a syntax error.

All 2 comments

@jacqueswww Maybe this highlights the case for a custom grammar. That kind of thing really should be a syntax error.

@davesque yup.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

domrany64 picture domrany64  路  3Comments

ben-kaufman picture ben-kaufman  路  4Comments

fubuloubu picture fubuloubu  路  3Comments

travs picture travs  路  3Comments

jakerockland picture jakerockland  路  4Comments