# Typing vs Runtime Behaviour

**URL:** https://discuss.python.org/t/typing-vs-runtime-behaviour/81595
**Category:** Ideas
**Tags:** typing
**Created:** [February 21, 2025, 12:18pm UTC](https://discuss.python.org/t/typing-vs-runtime-behaviour/81595 "2025-02-21T12:18:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Andrej730](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/andrej730/32/19993_2.png) [@Andrej730](https://discuss.python.org/u/Andrej730)
#### Post date: [February 21, 2025, 12:18pm UTC](https://discuss.python.org/t/typing-vs-runtime-behaviour/81595/1 "2025-02-21T12:18:13Z")

</div>

Is there some place where all the differences between runtime behaviour vs typing behaviour documented? It would be nice to have some kind of a reference list of what discrepancies are accepted in current typing system and that users may met in the edge cases.

E.g. I’ve just met an issue with `enumerate` accepting ` __getitem__ ` iterables on Runtime and not accepting it in typing and then I’ve found a [PR](https://github.com/python/typeshed/pull/12294) that exactly that which lead me to [explanation](https://github.com/python/typeshed/issues/7813#issuecomment-1121660316) on why this compromise is made. Another example is ` __buffer__ ` [virtually implemented](https://github.com/python/typeshed/issues/10224) before 3.12.

---

<div class="post-metadata">

### Author: ![Andrej730](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/andrej730/32/19993_2.png) [@Andrej730](https://discuss.python.org/u/Andrej730)
#### Post date: [March 7, 2025, 5:40pm UTC](https://discuss.python.org/t/typing-vs-runtime-behaviour/81595/2 "2025-03-07T17:40:57Z")

</div>

Or another example just found - `typing.Generator` doesn’t account for return/send types having default arguments only since Python 3.13 and it’s showing false negative in Python 3.11 ([see](https://github.com/microsoft/pyright/issues/10045)).

Which again is not a problem, it’s just annoying meeting those papercuts and discrepancies and investigating whether it’s an actual bug or there’s a reasonable explanation just to find that yes, there is, it’s just takes time to track it down.
