8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef72455 commit ad7f83bCopy full SHA for ad7f83b
src/runtime/pyobject.cs
@@ -657,19 +657,14 @@ public virtual void DelItem(int index)
657
/// <summary>
658
/// Length Method
659
/// </summary>
660
- /// <remarks>
661
- /// Returns the length for objects that support the Python sequence
662
- /// protocol, or 0 if the object does not support the protocol.
663
- /// </remarks>
664
public virtual long Length()
665
{
666
DebugUtil.EnsureGIL();
667
668
var s = Runtime.PyObject_Size(obj);
669
if (s < 0)
670
671
- Runtime.PyErr_Clear();
672
- return 0;
+ throw PythonException.ThrowLastAsClrException();
673
}
674
return s;
675
0 commit comments