""" Some correct syntax for variable annotation here. More examples are in test_grammar and test_parser. """ from typing import no_type_check, ClassVar i: int = 1 j: int x: float = i/10 def f(): class C: ... return C() f().new_attr: object = object() class C: def __init__(self, x: int) -> None: self.x = x c = C(5) c.new_attr: int = 10 __annotations__ = {} @no_type_check class NTC: def meth(self, param: complex) -> None: ... class CV: var: ClassVar['CV'] CV.var = CV()
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
__pycache__ | Folder | 0755 |
|
|
libregrtest | Folder | 0755 |
|
|
support | Folder | 0755 |
|
|
__init__.py | File | 47 B | 0644 |
|
__main__.py | File | 41 B | 0644 |
|
ann_module.py | File | 1.08 KB | 0644 |
|
ann_module2.py | File | 519 B | 0644 |
|
ann_module3.py | File | 448 B | 0644 |
|
regrtest.py | File | 1.33 KB | 0755 |
|
test_support.py | File | 24.12 KB | 0644 |
|