summaryrefslogtreecommitdiffstats
path: root/Demo/sgi/flp
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-12-17 14:57:24 (GMT)
committerGuido van Rossum <guido@python.org>1993-12-17 14:57:24 (GMT)
commit96b608cf6ddb4c7b670c15a365ed8b14accd5d37 (patch)
tree3842dfcbc7e4708631efd2a7c377b852fe5232c2 /Demo/sgi/flp
parent1b789f9fe0a416f15c83f27ca09f0316aa073c6d (diff)
downloadcpython-96b608cf6ddb4c7b670c15a365ed8b14accd5d37.zip
cpython-96b608cf6ddb4c7b670c15a365ed8b14accd5d37.tar.gz
cpython-96b608cf6ddb4c7b670c15a365ed8b14accd5d37.tar.bz2
*** empty log message ***
Diffstat (limited to 'Demo/sgi/flp')
-rwxr-xr-xDemo/sgi/flp/test_cb.py11
-rwxr-xr-xDemo/sgi/flp/test_nocb.py2
2 files changed, 6 insertions, 7 deletions
diff --git a/Demo/sgi/flp/test_cb.py b/Demo/sgi/flp/test_cb.py
index d622332..4163503 100755
--- a/Demo/sgi/flp/test_cb.py
+++ b/Demo/sgi/flp/test_cb.py
@@ -14,11 +14,11 @@ import sys
# The following struct is created to hold the instance variables
# main_form, button1, button2 and exitbutton.
-class myform():
+class myform:
#
- # The init function parses and creates the form, but doesn't
+ # The constructor parses and creates the form, but doesn't
# display it (yet).
- def init(self, number):
+ def __init__(self, number):
#
# First we parse the form
parsetree = flp.parse_form('test_cb', 'main_form')
@@ -29,7 +29,6 @@ class myform():
# And keep our number
self.number = number
- return self
#
# The show function displays the form. It doesn't do any interaction,
@@ -52,8 +51,8 @@ class myform():
# The main program. Instantiate two variables of the forms class
# and interact with them.
-form1 = myform().init(1)
-form2 = myform().init(2)
+form1 = myform(1)
+form2 = myform(2)
form1.show()
form2.show()
diff --git a/Demo/sgi/flp/test_nocb.py b/Demo/sgi/flp/test_nocb.py
index 48cee9d..6346da3 100755
--- a/Demo/sgi/flp/test_nocb.py
+++ b/Demo/sgi/flp/test_nocb.py
@@ -12,7 +12,7 @@ import sys
# The following struct is created to hold the instance variables
# main_form, button1, button2 and exitbutton.
-class struct(): pass
+class struct: pass
container = struct()
#