Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
e5806058
Commit
e5806058
authored
Dec 01, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more work on first cut
parent
0318a786
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
169 additions
and
67 deletions
+169
-67
lib/python/Interface/Attr.py
lib/python/Interface/Attr.py
+4
-4
lib/python/Interface/Exceptions.py
lib/python/Interface/Exceptions.py
+5
-5
lib/python/Interface/Method.py
lib/python/Interface/Method.py
+22
-22
lib/python/Interface/iclass.py
lib/python/Interface/iclass.py
+36
-36
lib/python/Interface/pyfiles
lib/python/Interface/pyfiles
+10
-0
lib/python/Interface/release.sh
lib/python/Interface/release.sh
+21
-0
lib/python/Interface/test.py
lib/python/Interface/test.py
+71
-0
No files found.
lib/python/Interface/Attr.py
View file @
e5806058
lib/python/Interface/Exceptions.py
View file @
e5806058
lib/python/Interface/Method.py
View file @
e5806058
lib/python/Interface/iclass.py
View file @
e5806058
lib/python/Interface/pyfiles
0 → 100644
View file @
e5806058
Attr.py
Basic.py
Exceptions.py
Mapping.py
Method.py
Number.py
Standard.py
Util.py
__init__.py
iclass.py
lib/python/Interface/release.sh
0 → 100644
View file @
e5806058
R
=
$1
M
=
Interface
for
f
in
test.py
`
cat
pyfiles
`
;
do
python1.5.1 /projects/sbin/tabnanny.py
$f
done
mkdir
"
$M
-
$R
"
"
$M
-
$R
/Interface"
for
f
in
`
cat
pyfiles
`
;
do
cp
$f
"
$M
-
$R
/Interface/"
done
for
f
in
README.txt test.py
;
do
cp
$f
"
$M
-
$R
/"
done
tar
cvf
"
$M
-
$R
.tar"
"
$M
-
$R
"
rm
-f
"
$M
-
$R
.tar.gz"
gzip
"
$M
-
$R
.tar"
lib/python/Interface/test.py
0 → 100644
View file @
e5806058
import
Interface
class
C
:
def
m1
(
self
,
a
,
b
):
"return 1"
return
1
def
m2
(
self
,
a
,
b
):
"return 2"
return
2
IC
=
Interface
.
impliedInterface
(
C
)
print
"should be 0:"
,
IC
.
implementedByInstancesOf
(
C
)
C
.
__implements__
=
IC
print
"should be 1:"
,
IC
.
implementedByInstancesOf
(
C
)
class
I1
(
Interface
.
Base
):
def
ma
(
self
):
"blah"
class
I2
(
I1
):
pass
class
I3
(
Interface
.
Base
):
pass
class
I4
(
Interface
.
Base
):
pass
class
A
(
I1
.
defered
()):
__implements__
=
I1
class
B
:
__implements__
=
I2
,
I3
class
D
(
A
,
B
):
pass
class
E
(
A
,
B
):
__implements__
=
A
.
__implements__
,
C
.
__implements__
print
for
c
in
A
,
B
,
C
,
D
,
E
:
print
"%s implements: %s"
%
(
c
.
__name__
,
Interface
.
implementedByInstancesOf
(
c
))
print
for
c
in
A
,
B
,
C
,
D
,
E
:
print
"an instance of %s implements: %s"
%
(
c
.
__name__
,
Interface
.
implementedBy
(
c
()))
for
i
in
I1
,
I2
,
I3
,
I4
,
IC
:
print
for
c
in
A
,
B
,
C
,
D
,
E
:
print
"%s is implemented by instances of %s? %s"
%
(
i
.
__name__
,
c
.
__name__
,
i
.
implementedByInstancesOf
(
c
))
print
for
c
in
A
,
B
,
C
,
D
,
E
:
print
"%s is implemented by an instance of %s? %s"
%
(
i
.
__name__
,
c
.
__name__
,
i
.
implementedBy
(
c
()))
a
=
A
()
try
:
a
.
ma
()
print
"something's wrong, this should have failed!"
except
:
pass
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment