diff options
author | Ivan Levkivskyi <levkivskyi@gmail.com> | 2017-12-14 10:59:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-14 10:59:44 (GMT) |
commit | 5364b5cd7571f2dfa75acd37b388c14ac33fef73 (patch) | |
tree | 43b89bf162a571e979946d2d9dcfda82b4e0f4c8 /Lib/test/bad_getattr3.py | |
parent | 9e7c136ad8bc8e8eec50c2a8ae5ff02752f695a2 (diff) | |
download | cpython-5364b5cd7571f2dfa75acd37b388c14ac33fef73.zip cpython-5364b5cd7571f2dfa75acd37b388c14ac33fef73.tar.gz cpython-5364b5cd7571f2dfa75acd37b388c14ac33fef73.tar.bz2 |
bpo-32225: Implementation of PEP 562 (#4731)
Implement PEP 562: module __getattr__ and __dir__.
The implementation simply updates module_getattro and
module_dir.
Diffstat (limited to 'Lib/test/bad_getattr3.py')
-rw-r--r-- | Lib/test/bad_getattr3.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/bad_getattr3.py b/Lib/test/bad_getattr3.py new file mode 100644 index 0000000..0d5f926 --- /dev/null +++ b/Lib/test/bad_getattr3.py @@ -0,0 +1,5 @@ +def __getattr__(name): + if name != 'delgetattr': + raise AttributeError + del globals()['__getattr__'] + raise AttributeError |