Skip to content

Argument issues and needed clarifications #3785

Closed as not planned
Closed as not planned
@elazarg

Description

@elazarg

I have several comments/questions regarding Argument and Var

  1. Following Better error message for incompatible default argument (take 2) #3783, attribute initialization_statement is not needed. It is only being copied and printed. Without it, it becomes pure data. There's also redundant bookkeeping in other places
  2. FuncItem steals the kinds and names from Argument on initialization, yet they are still accessed in several places - it's not clear who "owns" the information
  3. arg.type_annotation is also not really used (the type is read from arg.variable.type) and is not even bound
  4. In general, the relationship between Argument and Var (which is its first, well, argument) is not clear
  5. More so, given that a single argument may be responsible for multiple variables in Python2.7. This is hacked away in the parser, but the way it is handled (making a regular argument and adding an unpacking statement) makes it very difficult to give precise error messages

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions