Dave Tapley <d...@tapley.com> added the comment:

I don't know if it helps, but I just ran in to this when I followed the advice 
at (1) because I wanted to type hint a method with the type of the enclosing 
class.

This broke a package I'm working on in parallel (2) because it uses 
dataclasses.fields internally.

I'm not sure what the advice would be here, should my package detect if the 
caller has `from __future__ import annotations` and do something?



(1) 
https://stackoverflow.com/questions/33533148/how-do-i-type-hint-a-method-with-the-type-of-the-enclosing-class/33533514#33533514
(2) https://pypi.org/project/dataclasses-configobj/

----------
nosy: +davetapley

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

Reply via email to