Skip to content

Commit d383a1b

Browse files
authored
Merge pull request pvieito#49 from laclouis5/master
Count computed property
2 parents 05a130d + f237b6b commit d383a1b

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)