Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NIFTy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
10
Issues
10
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ift
NIFTy
Commits
7fdbe2c2
Commit
7fdbe2c2
authored
Sep 11, 2018
by
clienhar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added any() and all() methods to MultiField
not sure if and how the spaces parameter should be passed somehow
parent
dfbc582a
Pipeline
#36362
passed with stages
in 1 minute and 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
nifty4/multi/multi_field.py
nifty4/multi/multi_field.py
+12
-0
No files found.
nifty4/multi/multi_field.py
View file @
7fdbe2c2
...
@@ -160,6 +160,18 @@ class MultiField(object):
...
@@ -160,6 +160,18 @@ class MultiField(object):
return
False
return
False
return
True
return
True
def
any
(
self
):
result
=
False
for
field
in
self
.
_val
.
values
():
result
=
result
or
field
.
any
()
return
result
def
all
(
self
):
result
=
True
for
field
in
self
.
_val
.
values
():
result
=
result
and
field
.
all
()
return
result
for
op
in
[
"__add__"
,
"__radd__"
,
"__iadd__"
,
for
op
in
[
"__add__"
,
"__radd__"
,
"__iadd__"
,
"__sub__"
,
"__rsub__"
,
"__isub__"
,
"__sub__"
,
"__rsub__"
,
"__isub__"
,
"__mul__"
,
"__rmul__"
,
"__imul__"
,
"__mul__"
,
"__rmul__"
,
"__imul__"
,
...
...
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