Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
95b935ba
Commit
95b935ba
authored
Jan 16, 1998
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addition by Bill Bedford: Ordinal and NOrdinal classes so we can
implement "every", etc.
parent
1180608f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
1 deletion
+26
-1
Mac/Lib/lib-toolbox/aetypes.py
Mac/Lib/lib-toolbox/aetypes.py
+26
-1
No files found.
Mac/Lib/lib-toolbox/aetypes.py
View file @
95b935ba
...
...
@@ -185,6 +185,31 @@ class NComparison(Comparison):
def
__init__
(
self
,
obj1
,
obj2
):
Comparison
.
__init__
(
obj1
,
self
.
relo
,
obj2
)
class
Ordinal
:
"""An AE Ordinal"""
def
__init__
(
self
,
abso
):
# self.obj1 = obj1
self
.
abso
=
"%-4.4s"
%
str
(
abso
)
def
__repr__
(
self
):
return
"Ordinal(%s)"
%
(
`self.abso`
)
def
__str__
(
self
):
return
"%s"
%
(
string
.
strip
(
self
.
abso
))
def
__aepack__
(
self
):
return
pack
(
self
.
abso
,
'abso'
)
def
IsOrdinal
(
x
):
return
IsInstance
(
x
,
Ordinal
)
class
NOrdinal
(
Ordinal
):
# The class attribute 'abso' must be set in a subclass
def
__init__
(
self
):
Ordinal
.
__init__
(
self
,
self
.
abso
)
class
Logical
:
"""An AE logical expression object"""
...
...
@@ -533,7 +558,7 @@ exec template % ("Text", 'text')
exec
template
%
(
"Character"
,
'cha '
)
exec
template
%
(
"Word"
,
'cwor'
)
exec
template
%
(
"Line"
,
'clin'
)
exec
template
%
(
"
P
aragraph"
,
'cpar'
)
exec
template
%
(
"
p
aragraph"
,
'cpar'
)
exec
template
%
(
"Window"
,
'cwin'
)
exec
template
%
(
"Document"
,
'docu'
)
exec
template
%
(
"File"
,
'file'
)
...
...
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