Skip to content

Commit 252d2d9

Browse files
committed
Add conversion for AbstractString to Py object
1 parent 7be3398 commit 252d2d9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Core/Py.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ Py(x::Py) = x
137137
Py(x::Nothing) = pybuiltins.None
138138
Py(x::Bool) = x ? pybuiltins.True : pybuiltins.False
139139
Py(x::Union{String,SubString{String},Char}) = pystr(x)
140+
Py(x::AbstractString) = Py(String(x))
140141
Py(x::Base.CodeUnits{UInt8,String}) = pybytes(x)
141142
Py(x::Base.CodeUnits{UInt8,SubString{String}}) = pybytes(x)
142143
Py(x::Tuple) = pytuple_fromiter(x)

0 commit comments

Comments
 (0)