diff options
author | Guido van Rossum <guido@python.org> | 1993-05-21 19:56:10 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1993-05-21 19:56:10 (GMT) |
commit | b3f7258f14cb2f3e52236a4087ed82541a173e7b (patch) | |
tree | 4bb2d9aa0d0dbdd7fca7fdb22eaa80c98b27cbb7 /Grammar | |
parent | 81daa32c15cfa9f05eda037916cdbfd5b4323431 (diff) | |
download | cpython-b3f7258f14cb2f3e52236a4087ed82541a173e7b.zip cpython-b3f7258f14cb2f3e52236a4087ed82541a173e7b.tar.gz cpython-b3f7258f14cb2f3e52236a4087ed82541a173e7b.tar.bz2 |
* 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/Grammar | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Grammar/Grammar b/Grammar/Grammar index cb4bc27..430b791 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! |