Fixing wrong type int to str of type-concepts.md (#1958)

This commit is contained in:
Yuichi Tateno (secon) 2021-06-08 07:53:48 +09:00 committed by GitHub
parent 029eb2c869
commit e09560c3ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -272,7 +272,7 @@ def add(a: _StrOrFloat, b: _StrOrFloat) -> _StrOrFloat:
# The arguments for `a` and `b` are both `str`
v1 = add("hi", "there")
reveal_type(v1) # int
reveal_type(v1) # str
# The arguments for `a` and `b` are both `float`
v2 = add(1.3, 2.4)