Daviskr created this task.
Daviskr added a subscriber: Daviskr.
Daviskr added a project: pywikibot-core.

TASK DESCRIPTION
  Page generators can be iterated over multiple times when expected to be empty 
and stop after the first time. The following iterations can contain erratic 
results.
  
  For example: It is possible to iterate over a generator with a for loop and 
then iterate over that same generator with a later for loop.
  
  If the generator is called multiple times without `step` specified, the 
generator repeats itself if iterated over again. If `step` is specified, the 
generator shifts results erratically when called multiple times.
  
  Below is REPL output from the `test:test` site using 
`PrefixingPageGenerator()`.
  
  ```
  >>> ppg = PrefixingPageGenerator('a', step=2, total=3)
  >>> for _ in range(3):
  ...     print list(ppg)
  ...     
  [Page(A), Page(AAA), Page(AF Test)]
  [Page(AF Test), Page(AKlapper2), Page(API output)]
  [Page(AKlapper2), Page(API output), Page(API page move test)]
  ```
  
  Expected output would be `[]` after the first one.

TASK DETAIL
  https://phabricator.wikimedia.org/T85204

REPLY HANDLER ACTIONS
  Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign 
<username>.

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Daviskr
Cc: Aklapper, Daviskr, jayvdb, pywikipedia-bugs



_______________________________________________
Pywikipedia-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-bugs

Reply via email to