Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
use hasattr("__iter__")
  • Loading branch information
koubaa committed Feb 18, 2021
commit 07ee9fb986a2138eaf9378099088606573f749ad
2 changes: 1 addition & 1 deletion src/runtime/Codecs/IterableDecoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ internal static bool IsIterable(Type targetType)

internal static bool IsIterable(PyObject objectType)
{
return Runtime.PyIter_Check(objectType.Handle);
return objectType.HasAttr("__iter__");
Comment thread
lostmsu marked this conversation as resolved.
}

public bool CanDecode(PyObject objectType, Type targetType)
Expand Down