Skip to content

Commit f237b6b

Browse files
committed
Count computed property
1 parent 933624f commit f237b6b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

PythonKit/Python.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,6 +1400,11 @@ extension PythonObject : Sequence {
14001400
}
14011401
}
14021402

1403+
extension PythonObject {
1404+
public var count: Int {
1405+
Int(Python.len(self))!
1406+
}
1407+
}
14031408

14041409
//===----------------------------------------------------------------------===//
14051410
// `ExpressibleByLiteral` conformances

0 commit comments

Comments
 (0)