[New-bugs-announce] [issue45529] checking any object for attr "get" always returns True with `hasattr`

Clay Massok report at bugs.python.org
Tue Oct 19 17:26:07 EDT 2021


New submission from Clay Massok <m.c.massok at gmail.com>:

Any time you use `hasattr` to check if a dict has the attr "get", it returns true.

Uploaded `.py` file has bug example.

----------
components: macOS
files: bug.py
messages: 404353
nosy: m.c.massok, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: checking any object for attr "get" always returns True with `hasattr`
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file50371/bug.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45529>
_______________________________________


More information about the New-bugs-announce mailing list