Skip to content

Commit

Permalink
bad example
Browse files Browse the repository at this point in the history
  • Loading branch information
szabgab committed Dec 14, 2024
1 parent ca5896c commit 3130c89
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def the_same[T](x: T, y: T) -> None:
print(x, y)

the_same(2, 2)
the_same("hi", "hi")
the_same("hi", 2)
7 changes: 7 additions & 0 deletions python/python-types-at-pyweb-2024-12.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,4 +301,11 @@ Found 1 error in 1 file (checked 1 source file)
```


## Two variables of the same and different types
{id: python-types-at-pyweb-2024-12-same-and-different-types}

TODO: Why is mypy accepting this?

![](examples/python-types-at-pyweb-2024-12/generics_two_types.py)


0 comments on commit 3130c89

Please sign in to comment.