Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 733 Bytes

README.md

File metadata and controls

25 lines (15 loc) · 733 Bytes

NOTICE: If you're reading this on GitHub.com please be aware this is a mirror of the primary remote located at https://code.richard.do/explore/projects. Please direct issues and pull requests there.

hasattr_safe

Build Status

hasattr() in Python 2 hides all exceptions, hasattr_safe() does not, as is the behaviour in Python 3.

Installation

pip install hasattr-safe

Usage

import hasattr_safe

cake_is_a_lie = hasattr_safe(TheCake, 'lies')

https://docs.python.org/3/library/functions.html#hasattr