Uploaded image for project: ' Swift for TensorFlow'
  1. Swift for TensorFlow
  2. TF-337

PythonObject conformance to Sequence uses array indexing instead of Python.iter(...)

    XMLWordPrintable

    Details

      Description

      // This code works in the python equivalent but fails in swift:
      import Python
      for v in Python.iter([1,2,3]) {
          print(v)
      }
      

      This should be just making an explicit conformance to Sequence and IteratorProtocol rather than relying on the generated conformance from Collection.

        Attachments

          Activity

            People

            Assignee:
            sendilkumarn Sendil Kumar
            Reporter:
            pschuh Parker Schuh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: