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_getattr2.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_getattr2.py')
-rw-r--r-- | Lib/test/bad_getattr2.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/bad_getattr2.py b/Lib/test/bad_getattr2.py new file mode 100644 index 0000000..0a52a53 --- /dev/null +++ b/Lib/test/bad_getattr2.py @@ -0,0 +1,7 @@ +def __getattr__(): + "Bad one" + +x = 1 + +def __dir__(bad_sig): + return [] |