Skip to content

Specify how to annotate variable types #6

@JukkaL

Description

@JukkaL

We should probably have a single convention for attribute and module-level variable annotations that would at least be recommended (even if other ways would also work).

Here are some potential approaches:

  • x = 0, x = '', etc. (at least for built-in types)
  • x = Undefined(int)
  • x = Undefined # type: int
  • # var x: int (a proposal for PEP 484, still under discussion)
  • x = ClassName()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions