Victor
Victor
While this is surprising for users, I am personally for keeping the behavior as is. The reason is that in Python `bool` derives from `int` and so there's technically no...
One thing we could do is raise a Python warning
@gwl78 Until we decide what to do with the surprising behavior, your options are basically: 1. Use older versions of Python.NET 2. Change your own API to not hit that...
@sschukat I think yours should be filed as a separate issue, as it might be fixable in 3.0 (unsure here).
You can create your own encoders and decoders. https://github.com/pythonnet/pythonnet/wiki/Codecs:-customizing-object-marshalling-between-.NET-and-Python
@rmadsen-ks are you trying to serialize `PyObject` with NewtonSoft JSON? If so, that sounds somewhat misguided. You should have `InputImpendanceEnum` on C# side, and an encoder/decoder pair to convert between...
@rmadsen-ks because the object you are serializing has a field of type `PyObject`, but in practice you can't actually have arbitrary `PyObject` there, only a specific type of `PyObject`.
> example in the docs really looks like str(obj) is a valid implementation In the example they have `Complex` convertible to `DateTime`, which does not inspire confidence.
```csharp return type == typeof(IList); ``` This never could have worked because no concrete instance has type of `IList`.
@filmor can always scan the loaded assemblies like we do for reflecting types. Just skip the assemblies loaded in reflection only context.