Op vr 14 sep. 2018 om 08:07 schreef Anders Hovmöller <bo...@killingar.net>:
> > > I'd like to propose an extension for the warnings module > > to address this problem. > > I like all of that. The only issue I have with it is that the warnings > module is designed to namespace depredations so you can turn them on per > library and this code doesn’t seem to handle that. We really want to avoid > libraries using these convenience functions instead of creating their own > warning that can be properly filtered. > I feel there could be solutions. Either module.__getattribute__ (which, IIRC, was implemented recently), or just using a proxy/wrapper class around non-Union[class, function] objects. Those are rare, though, in imported modules. And I don't think this library will see much use without the subjects being imported first - at least I know I do my refactors on a per-file basis. And if you can't, you might want to split your files first.
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/