Closed t-kalinowski closed 2 years ago
I think we don't even need a separate method for python.builtin.iterator
, the method for python.builtin.object
covers all cases. I'm going to remove it.
Now this is just missing a NEWS bullet :)
Done!
Thanks! Do you need that on CRAN? If yes, I'll probably release right away, otherwise this might sit on github for months. Do you have any other planned changes for coro?
This came out of working on updates to the Tensorflow website, which is still ongoing work. I don’t have any other coro enhancements planned presently, but other things might still shake out in the next two weeks while we’re updating the TF examples. @dfalbel what do you think?
@lionel- If it's ok with you, let's wait ~ 2 weeks. I'll ping you when we need this on CRAN.
That sounds good.
Hi @lionel-, the dev version is working great for us and I don't think we'll have any additional PRs to coro in the near term. When you get a chance, can you please publish to CRAN?
Great, I'll do that!
This PR adds an
as_iterator()
method for a base python object. This enables usage like this with TensorFlow Datasets:Without this, users need to instead explicitly call
reticulate::as_iterator(ds)
, before passing tocoro::loop()
, which can be confusing because of the name clash betweencoro::as_iterator()
, and also not necessary for most other iterables that are automatically converted to an iterator.