Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
31960d21
Commit
31960d21
authored
Sep 03, 2018
by
Martin Reinecke
Browse files
cosmetics
parent
1255a779
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty5/multi_field.py
View file @
31960d21
...
@@ -55,7 +55,8 @@ class MultiField(object):
...
@@ -55,7 +55,8 @@ class MultiField(object):
if
domain
is
None
:
if
domain
is
None
:
for
dd
in
dict
.
values
():
for
dd
in
dict
.
values
():
if
not
isinstance
(
dd
.
domain
,
DomainTuple
):
if
not
isinstance
(
dd
.
domain
,
DomainTuple
):
raise
TypeError
(
'Values of dictionary need to be Fields defined on DomainTuples.'
)
raise
TypeError
(
'Values of dictionary need to be Fields '
'defined on DomainTuples.'
)
domain
=
MultiDomain
.
make
({
key
:
v
.
_domain
domain
=
MultiDomain
.
make
({
key
:
v
.
_domain
for
key
,
v
in
dict
.
items
()})
for
key
,
v
in
dict
.
items
()})
res
=
tuple
(
dict
[
key
]
if
key
in
dict
else
Field
(
dom
,
0
)
res
=
tuple
(
dict
[
key
]
if
key
in
dict
else
Field
(
dom
,
0
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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