summaryrefslogtreecommitdiff
path: root/Grammar
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-05-21 19:56:10 +0000
committerGuido van Rossum <guido@python.org>1993-05-21 19:56:10 +0000
commit65ff1ef27e4a9a38e45e00ab61ff467d5b4f6e7e (patch)
tree23b1117acaf92277e566dab6b7c56b6067531359 /Grammar
parent9364a384f44d078fb358e05e05008496c5a38ff8 (diff)
downloadcpython-65ff1ef27e4a9a38e45e00ab61ff467d5b4f6e7e.tar.gz
* Lots of small changes related to access.
* Added "access *: ...", made access work for class methods. * Introduced subclass check: make sure that when calling ClassName.methodname(instance, ...), the instance is an instance of ClassName or of a subclass thereof (this might break some old code!)
Diffstat (limited to 'Grammar')
-rw-r--r--Grammar/Grammar2
1 files changed, 1 insertions, 1 deletions
diff --git a/Grammar/Grammar b/Grammar/Grammar
index cb4bc2718e..430b791369 100644
--- a/Grammar/Grammar
+++ b/Grammar/Grammar
@@ -100,7 +100,7 @@ return_stmt: 'return' [testlist]
raise_stmt: 'raise' test [',' test]
import_stmt: 'import' NAME (',' NAME)* | 'from' NAME 'import' ('*' | NAME (',' NAME)*)
global_stmt: 'global' NAME (',' NAME)*
-access_stmt: 'access' NAME (',' NAME)* ':' accesstype (',' accesstype)*
+access_stmt: 'access' ('*' | NAME (',' NAME)*) ':' accesstype (',' accesstype)*
accesstype: NAME+
# accesstype should be ('public' | 'protected' | 'private') ['read'] ['write']
# but can't be because that would create undesirable reserved words!