Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pycomsdk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
com
pycomsdk
Commits
dfe773fb
Commit
dfe773fb
authored
Jun 30, 2022
by
Anton Pershin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgraded make_composite_func so that it can optionally return values
parent
af3e3b8c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
edge.py
comsdk/edge.py
+7
-1
No files found.
comsdk/edge.py
View file @
dfe773fb
...
...
@@ -364,8 +364,14 @@ def make_dump(dump_name_format, format_keys=(), omit=None, method='pickle'):
def
make_composite_func
(
*
funcs
):
def
_composite
(
d
):
res
=
None
for
func
in
funcs
:
func
(
d
)
f_res
=
func
(
d
)
# this trick allows us to combine returning
# and non-returning functions
if
f_res
is
not
None
:
res
=
f_res
return
res
return
_composite
...
...
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