[lang-ref] ( assign_with_type_check ) ( python )
def test_assign_with_type_check():
pytest.skip('Not supported in Python')
def test_assign_with_type_check_alternative():
# this is just a type annotation (for tools and readers)
x: int = 1
assert isinstance(x, int) == True
# it does not mean the runtime enforces the type
x = 1.5
assert x == 1.5
assert isinstance(x, float) == True