From 31d0b15d0773d155905c50d3a9afb44528114020 Mon Sep 17 00:00:00 2001 From: Elijah Rippeth Date: Thu, 13 Jan 2022 12:06:26 -0500 Subject: [PATCH] IterDataPipes do not have __next__ --- README.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.rst b/README.rst index b95548c1bf..e4b67975b7 100644 --- a/README.rst +++ b/README.rst @@ -111,8 +111,7 @@ For example, to access the raw text from the AG_NEWS dataset: >>> from torchtext.datasets import AG_NEWS >>> train_iter = AG_NEWS(split='train') - >>> next(train_iter) - >>> # Or iterate with for loop + >>> # Iterate with for loop >>> for (label, line) in train_iter: >>> print(label, line) >>> # Or send to DataLoader