New class syntax
This commit is contained in:
Guido van Rossum 1991-12-30 16:02:20 +00:00
parent d404569b97
commit 564f5507c3
2 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@
Error = 'TransParent.Error' # Exception
class ManageOneChild():
class ManageOneChild:
#
# Upcalls shared with other single-child parents
#
@ -23,7 +23,7 @@ class ManageOneChild():
raise Error, 'delchild: not my child'
self.child = 0
class TransParent() = ManageOneChild():
class TransParent(ManageOneChild):
#
# Calls from creator
# NB derived classes may add parameters to create()

View File

@ -5,7 +5,7 @@
Error = 'TransParent.Error' # Exception
class ManageOneChild():
class ManageOneChild:
#
# Upcalls shared with other single-child parents
#
@ -23,7 +23,7 @@ class ManageOneChild():
raise Error, 'delchild: not my child'
self.child = 0
class TransParent() = ManageOneChild():
class TransParent(ManageOneChild):
#
# Calls from creator
# NB derived classes may add parameters to create()