# PEP 749: Implementing PEP 649

**URL:** <https://discuss.python.org/t/pep-749-implementing-pep-649/54974>\
**Category:** PEPs\
**Created:** [June 5, 2024, 1:07am UTC](https://discuss.python.org/t/pep-749-implementing-pep-649/54974 "2024-06-05T01:07:14Z")\
**Posts on this page:** 1\
**Showing post:** 28

<div class="post-metadata">

**Author:** ![Jelle](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/jelle/32/1049_2.png) [@Jelle](https://discuss.python.org/u/Jelle)\
**Post date:** [June 17, 2024, 12:39am UTC](https://discuss.python.org/t/pep-749-implementing-pep-649/54974/28 "2024-06-17T00:39:40Z")

</div>

I ran into a few interrelated bugs with the current implementation:

```python
>>> class X(type):
... a: int
...     
>>> class Y(metaclass=X):
... b: str
...     
>>> X. __annotations__
{'a': <class 'int'>}
>>> Y. __annotations__
{'a': <class 'int'>}

```

Accessing the annotations on the metaclass caches them in the metaclass’s ` __dict__ `, and subsequently, lookups on classes that are instances of the metaclass return the metaclass’s annotations.

And if the class itself doesn’t have any annotations:

```python
>>> class X(type):
... a: int
...     
>>> class Y(metaclass=X): pass
... 
>>> Y. __annotate__
<bound method X. __annotate__ of <class ' __main__.Y'>>

```

Instead, `Y. __annotate__ ` should be None.

I’ve stared at this problem for a while now and I’m not sure what to do about it yet; I’d appreciate any opinions.

I’ll note that some related behavior is also buggy on existing versions (this is 3.12.2):

```python
>>> class X(type):
... a: int
... 
>>> class Y(metaclass=X): pass
... 
>>> Y. __annotations__
{'a': <class 'int'>}

```

---

_[View the full topic](https://discuss.python.org/t/pep-749-implementing-pep-649/54974)._
