[swift-evolution] Python Interop with Swift 4+

Chris Lattner sabre at nondot.org
Sun Nov 19 20:16:06 CST 2017


Hi all,

As I mentioned on a couple other threads, I’ve been working on improving Swift interoperability with Python.  I have two pitches out: one to improve Python member lookup and one to improve calls to Python values.  While those proposals are important, I think it is also useful to see what can be accomplished with Swift today.

To show you how far we can get, here is a Swift playground (tested with Xcode 9) that has an example interoperability layer, and a tutorial for using it.  If you’re interested in the pitches, or in Python, please check it out:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PythonInterop.playground.zip
Type: application/zip
Size: 27129 bytes
Desc: not available
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171119/ed5c1964/attachment.zip>
-------------- next part --------------


In addition to showing how far the interop can go today (which is really quite far) it shows what the future will look like assuming the member lookup and call issues are resolved.  To reiterate what I said on the pitch threads, I am not attached at all to the details of the two pitches themselves, I simply want the problems they address to be solved.

Finally, of course I also welcome questions and feedback on the actual approach, naming, and other suggestions to improve the model!  Thanks,

-Chris



More information about the swift-evolution mailing list