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
8ba8f551
Commit
8ba8f551
authored
Jan 16, 2001
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merged from branch
parent
20487259
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
11 deletions
+19
-11
lib/python/Interface/Attr.py
lib/python/Interface/Attr.py
+1
-0
lib/python/Interface/CHANGES.txt
lib/python/Interface/CHANGES.txt
+5
-0
lib/python/Interface/InterfaceBase.py
lib/python/Interface/InterfaceBase.py
+8
-10
lib/python/Interface/Method.py
lib/python/Interface/Method.py
+1
-1
lib/python/Interface/README.txt
lib/python/Interface/README.txt
+3
-0
lib/python/Interface/iclass.py
lib/python/Interface/iclass.py
+1
-0
No files found.
lib/python/Interface/Attr.py
View file @
8ba8f551
...
...
@@ -10,6 +10,7 @@ class Attribute(InterfaceBase):
"""
self
.
__name__
=
__name__
self
.
__doc__
=
__doc__
or
__name__
self
.
__tagged_values
=
{}
...
...
lib/python/Interface/CHANGES.txt
View file @
8ba8f551
Interface package change history
Release 0.5 (Zope 2.3b1)
Many changes to API. Added unit tests, pretty printing, verification
code, tagged data, and other stuff.
Release 0.1.1
This release includes some changes to the documentation to reflect
...
...
lib/python/Interface/InterfaceBase.py
View file @
8ba8f551
class
InterfaceBase
:
__meta_data
=
{}
def
getName
(
self
):
""" Returns the name of the object. """
return
self
.
__name__
...
...
@@ -11,17 +9,17 @@ class InterfaceBase:
""" Returns the documentation for the object. """
return
self
.
__doc__
def
get
Data
(
self
,
key
):
""" Returns the value associated with '
key
'. """
return
self
.
__
meta_data
[
key
]
def
get
TaggedValue
(
self
,
tag
):
""" Returns the value associated with '
tag
'. """
return
self
.
__
tagged_values
[
tag
]
def
get
DataKey
s
(
self
):
""" Returns a list of all
key
s. """
return
self
.
__
meta_data
.
keys
()
def
get
TaggedValueTag
s
(
self
):
""" Returns a list of all
tag
s. """
return
self
.
__
tagged_values
.
keys
()
def
set
Data
(
self
,
key
,
value
):
def
set
TaggedValue
(
self
,
tag
,
value
):
""" Associates 'value' with 'key'. """
self
.
__
meta_data
[
key
]
=
value
self
.
__
tagged_values
[
tag
]
=
value
...
...
lib/python/Interface/Method.py
View file @
8ba8f551
...
...
@@ -74,7 +74,7 @@ class Method(Attribute):
return
info
def
getSignature
Repr
(
self
):
def
getSignature
String
(
self
):
sig
=
"("
for
v
in
self
.
positional
:
sig
=
sig
+
v
...
...
lib/python/Interface/README.txt
View file @
8ba8f551
Python Interfaces - The Scarecrow Implementation
*Note: This is Jim's original proposal. Up to date user docs can be found
at http://www.zope.org/Wikis/Interfaces*
This document describes my implementation of the Python interfaces
scarecrow proposal.
...
...
lib/python/Interface/iclass.py
View file @
8ba8f551
...
...
@@ -51,6 +51,7 @@ class Interface(InterfaceBase):
"Concrete attribute, %s"
%
k
)
self
.
__attrs
=
attrs
self
.
__tagged_values
=
{}
#why?
def
getBases
(
self
):
return
self
.
__bases__
...
...
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