For those who are interested, here's an updated version of the Python interop layer that I'm slowly pushing forward. This adopts conditional conformances, which cleans up the array/dictionary interop layer (they can now conform to PythonConvertible). This does not yet adopt @dynamicMemberLookup, as it is not supported in Xcode 9.3:
http://nondot.org/sabre/PythonInterop.playground.zip
Questions, comments, suggestions for improvement welcome.
-Chris
19 Likes
pvieito
(Pedro José Pereira Vieito)
2
Great! For anyone interested I have published a packaged version to use it with Swift PM on macOS/Linux: GitHub - pvieito/PythonKit: Swift framework to interact with Python.
3 Likes
hunturkey
(Kevin Pham)
3
Now that @dynamicMemberLookup is implemented in the recently released Swift 4.2, will you be updating your PythonInterop.playground file to show how it can be used?