[issue34816] ctypes + hasattr

2018-09-27 Thread Lars Friedrich
Lars Friedrich added the comment: Thank you for your reply. I am not sure if I understood correctly: Do you suggest to modify ctypes.__init__.py so that the __getattr__ method of LibraryLoader catches the OSError and raises an AttributeError instead, as in your example

[issue34816] ctypes + hasattr

2018-09-27 Thread Lars Friedrich
New submission from Lars Friedrich : The following creates an OSError: import ctypes hasattr(ctypes.windll, 'test') The expected behavior would be to return "False" -- components: ctypes messages: 326528 nosy: lfriedri priority: normal severity: normal status: open tit