Skip to content

Argument issues and needed clarifications #3785

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

Closed
elazarg opened this issue Jul 31, 2017 · 0 comments
Closed

Argument issues and needed clarifications #3785

elazarg opened this issue Jul 31, 2017 · 0 comments
Labels
refactoring Changing mypy's internals topic-usability

Comments

@elazarg
Copy link
Contributor

elazarg commented Jul 31, 2017

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
@ilevkivskyi ilevkivskyi added refactoring Changing mypy's internals topic-usability labels Aug 7, 2017
@hauntsaninja hauntsaninja closed this as not planned Won't fix, can't repro, duplicate, stale Aug 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Changing mypy's internals topic-usability
Projects
None yet
Development

No branches or pull requests

3 participants