Skip to content

Commit 56ed7e2

Browse files
authored
Merge pull request #43 from philipturner/patch-3
Revert add support for non-returning functions
2 parents b9aa387 + 03782cf commit 56ed7e2

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

PythonKit/Python.swift

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,27 +1550,13 @@ public struct PythonFunction {
15501550
return try fn(argumentsAsTuple[0])
15511551
}
15521552
}
1553-
1554-
public init(_ fn: @escaping (PythonObject) throws -> Void) {
1555-
function = PyFunction { argumentsAsTuple in
1556-
try fn(argumentsAsTuple[0])
1557-
return Python.None
1558-
}
1559-
}
15601553

15611554
/// For cases where the Swift function should accept more (or less) than one parameter, accept an ordered array of all arguments instead
15621555
public init(_ fn: @escaping ([PythonObject]) throws -> PythonConvertible) {
15631556
function = PyFunction { argumentsAsTuple in
15641557
return try fn(argumentsAsTuple.map { $0 })
15651558
}
15661559
}
1567-
1568-
public init(_ fn: @escaping ([PythonObject]) throws -> Void) {
1569-
function = PyFunction { argumentsAsTuple in
1570-
try fn(argumentsAsTuple.map { $0 })
1571-
return Python.None
1572-
}
1573-
}
15741560
}
15751561

15761562
extension PythonFunction : PythonConvertible {

0 commit comments

Comments
 (0)