summaryrefslogtreecommitdiffstats
path: root/Lib/test/bad_getattr.py
diff options
context:
space:
mode:
authorIvan Levkivskyi <levkivskyi@gmail.com>2017-12-14 10:59:44 (GMT)
committerGitHub <noreply@github.com>2017-12-14 10:59:44 (GMT)
commit5364b5cd7571f2dfa75acd37b388c14ac33fef73 (patch)
tree43b89bf162a571e979946d2d9dcfda82b4e0f4c8 /Lib/test/bad_getattr.py
parent9e7c136ad8bc8e8eec50c2a8ae5ff02752f695a2 (diff)
downloadcpython-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_getattr.py')
-rw-r--r--Lib/test/bad_getattr.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/bad_getattr.py b/Lib/test/bad_getattr.py
new file mode 100644
index 0000000..16f901b
--- /dev/null
+++ b/Lib/test/bad_getattr.py
@@ -0,0 +1,4 @@
+x = 1
+
+__getattr__ = "Surprise!"
+__dir__ = "Surprise again!"