Skip to content

Commit a62e4bb

Browse files
author
Christopher Doris
committed
ensure pydict(::Pair...) method has at least one argument
1 parent 28ba994 commit a62e4bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Core/builtins.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,6 +1088,7 @@ end
10881088
"""
10891089
pydict(x)
10901090
pydict(; x...)
1091+
pydict(x::Pair...)
10911092
10921093
Convert `x` to a Python `dict`. In the second form, the keys are strings.
10931094
@@ -1098,7 +1099,7 @@ pydict(; kwargs...) =
10981099
isempty(kwargs) ? pynew(errcheck(C.PyDict_New())) : pystrdict_fromiter(kwargs)
10991100
pydict(x) = ispy(x) ? pybuiltins.dict(x) : pydict_fromiter(x)
11001101
pydict(x::NamedTuple) = pydict(; x...)
1101-
pydict(pairs::Pair...) = pydict(pairs)
1102+
pydict(pair::Pair, pairs::Pair...) = pydict((pair, pairs...))
11021103
export pydict
11031104

11041105
### datetime

0 commit comments

Comments
 (0)