#18123: let Transducer(word) output a word
-------------------------------------+-------------------------------------
       Reporter:  dkrenn             |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.6
      Component:  finite state       |   Resolution:
  machines                           |    Merged in:
       Keywords:  sd66, transducer,  |    Reviewers:  Clemens Heuberger
  words                              |  Work issues:
        Authors:  Daniel Krenn       |       Commit:
Report Upstream:  N/A                |  b3e699e778bd4c6027e982b38128e3671d07ebf1
         Branch:                     |     Stopgaps:
  u/cheuberg/fsm/words               |
   Dependencies:  #18118, #18114,    |
  #15267                             |
-------------------------------------+-------------------------------------
Changes (by cheuberg):

 * status:  needs_review => needs_work
 * reviewer:   => Clemens Heuberger


Comment:

 IMHO `.iter_process` should return an iterator in every case. Wouldn't it
 be cleaner to remove automatic_output from `.iter_process` alltogether and
 move this convenience option to `.process` or even only to the convenience
 method `__call__`?

 Further comments:
 * Introductory example: The sentence "Here processing works with iterators
 in background." is unclear to me.
 * code of `__call__`: in the branch `if ... input_tape.is_finite() ==
 False`:, the check `if not 'automatic_output_type' in kwargs` seems to be
 superfluous because it is set before.
 * `__call__`: Claims that automatic_output_type is set, but it is not.
 * documentation of `.process`: What is the difference in the results of
 `automatic_output_type=False` and `automatic_output_type=None`?
 * Please include doctests for `automatic_output_type`.
 * Code of `iter_process`: IMHO setting `kwargs['format_output']` once and
 using it once, but then again guarded by `if_automatic_output_type` is
 some kind of overkill and also some kind of abuse of that parameter.
 * For simplicity, I'd prefer to eliminate the possibility
 `automatic_output=None`: The magic that `format_output` is investigated in
 order to determine `automatic_output` could as well be moved to
 `__call__`. I can hardly imagine a use case of calling `.process` directly
 with `automatic_output=None`.

--
Ticket URL: <http://trac.sagemath.org/ticket/18123#comment:10>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to