Issue 33985: ContextVar does not have a "name" attribute (original) (raw)
Per PEP 567 and the contextvars documentation, I expected that a ContextVar would have a "name" read-only attribute. However I get an AttributeError when accessing ContextVar.name with 3.7.0rc1:
python Python 3.7.0rc1 (v3.7.0rc1:dfad352267, Jun 12 2018, 01:00:10) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information.
from contextvars import ContextVar var = ContextVar('var') var.name Traceback (most recent call last): File "", line 1, in AttributeError: 'ContextVar' object has no attribute 'name'