Alternative type-first annotation syntax: type: name = value
Discussions on Python.org
Alternative type-first annotation syntax: type: name = value
Title: Alternative type-first annotation syntax: type: name = value Body: Summary I’d like to propose an alternative syntax for variable type annotations where the type precedes the variable name, as an optional complement to PEP 526’s existing name: type = value form: str: name = "Laura" int: age = 20 float: height = 1.90 bool: is_developer = True This would be semantically identical to today’s: name: str = "Laura" age: int = 20 height: float = 1.90 is_developer: bool = Tr...
0 comments
No comments yet.