Skip to content

Commit 2b9f12e

Browse files
committed
add empty util
1 parent effbb00 commit 2b9f12e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

bayesflow/utils/empty.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class empty:
2+
"""
3+
Placeholder value for arguments left empty
4+
5+
Usage:
6+
7+
def f(x=empty):
8+
if x is empty:
9+
# we know the user did not pass x
10+
if x is None:
11+
# the user could have passed None explicitly
12+
13+
"""

0 commit comments

Comments
 (0)