Opened 4 years ago

Closed 3 years ago

#18990 closed defect (fixed)

FiniteStateMachine: Incorrect string formatting in final_word_out setter

Reported by: cheuberg Owned by:
Priority: trivial Milestone: sage-7.1
Component: finite state machines Keywords: beginner
Cc: skropf, dkrenn Merged in:
Authors: Emanuele Natale Reviewers: Clemens Heuberger
Report Upstream: N/A Work issues:
Branch: e16ca27 (Commits) Commit: e16ca2788133a0f7d711c02515d814d1209c2da3
Dependencies: Stopgaps:

Description

Indesired behaviour:

sage: A = Transducer(initial_states=[(0,0)])
sage: A.state((0, 0)).final_word_out = []
Traceback (most recent call last):
...
TypeError: not all arguments converted during string formatting

Change History (12)

comment:1 Changed 4 years ago by cheuberg

  • Type changed from PLEASE CHANGE to defect

Fix would be trivial (add a comma + doctest).

comment:2 Changed 3 years ago by dkrenn

  • Keywords beginner added

comment:3 Changed 3 years ago by natema

  • Branch set to u/natema/finitestatemachine__incorrect_string_formatting_in_final_word_out_setter

comment:4 Changed 3 years ago by cheuberg

  • Commit set to f6f38be79a6eba5da1e96c39a19b83ac90f095fe
  • Milestone changed from sage-6.9 to sage-7.1

Please also add a doctest demonstrating that the error has indeed been fixed.


New commits:

f6f38beFixed problem with tuples in final_word_out and is_final.

comment:5 Changed 3 years ago by git

  • Commit changed from f6f38be79a6eba5da1e96c39a19b83ac90f095fe to 612d2b9c6cc9396deab349b8f69c1c6e4f8216a2

Branch pushed to git repo; I updated commit sha1. New commits:

612d2b9Added doctests demonstrating that the :trac:`18990` has been fixed.

comment:6 Changed 3 years ago by natema

  • Status changed from new to needs_review

comment:7 Changed 3 years ago by cheuberg

  • Branch changed from u/natema/finitestatemachine__incorrect_string_formatting_in_final_word_out_setter to u/cheuberg/finitestatemachine__incorrect_string_formatting_in_final_word_out_setter

comment:8 follow-up: Changed 3 years ago by cheuberg

  • Commit changed from 612d2b9c6cc9396deab349b8f69c1c6e4f8216a2 to e16ca2788133a0f7d711c02515d814d1209c2da3
  • Reviewers set to Clemens Heuberger
  • Status changed from needs_review to needs_work
  • Work issues set to author name

Thanks.

I added two reviewer commits for PEP8 compliance.

Please add your full name in the author field of this ticket.

I do not know whether we have a strict policy on that, but most commits in Sage nowadays have the full name of the author as the git author, see the developer's guide. This would be impractical for these commits, but please do it for future contributions.

Apart from that, this is a positive review from my side.


New commits:

fd811f3Trac #18990: PEP8-compliance: line lengths
e16ca27Trac #18990: PEP8-compliance: spacing

comment:9 Changed 3 years ago by natema

  • Authors set to Emanuele Natale

comment:10 in reply to: ↑ 8 ; follow-up: Changed 3 years ago by natema

  • Status changed from needs_work to positive_review

Replying to cheuberg:

Thank you, and sorry about missing the PEP8 guidelines. I added myself as an author. I changed the status to positive_review.

comment:11 in reply to: ↑ 10 Changed 3 years ago by cheuberg

  • Work issues author name deleted

Replying to natema:

I changed the status to positive_review.

thanks, Clemens

comment:12 Changed 3 years ago by vbraun

  • Branch changed from u/cheuberg/finitestatemachine__incorrect_string_formatting_in_final_word_out_setter to e16ca2788133a0f7d711c02515d814d1209c2da3
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.