Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d1bc193

Browse files
committed
tiny refactor
1 parent d649d6c commit d1bc193

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/module.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ public PyModule Set(string name, object value)
313313
{
314314
if (name is null) throw new ArgumentNullException(nameof(name));
315315

316-
using var _value = Converter.ToPython(value, value?.GetType() ?? typeof(object));
316+
using var _value = Converter.ToPythonDetectType(value);
317317
SetPyValue(name, _value.Borrow());
318318
return this;
319319
}

0 commit comments

Comments
 (0)