Adrian Stachlewski <adrian.stachlew...@gmail.com> added the comment:

Thanks for explaining. I was trying to do something like

@dataclass
class A:
  x: ClassVar = set()

and thanks to you I know it should be 

@dataclass
class A:
  x: ClassVar[Set] = set()

If you are looking for improved error message, it's probably should be somehow 
connected to not proper usage of annotation. I've ended with default_factory 
because x: ClassVar = set() wasn't working and there was no error with 
default_factory and without slots.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33094>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to