Skip to content

Typo in example of README #107

Open
Open
@marcofavorito

Description

@marcofavorito

Describe the bug
In the "How to use" section of the README, the example is not correct (README at the commit: https://github.com/whitemech/pythomata/blob/cb521b8c98a63069ebc7a36e3ac43d47ab2941e6/README.md).

By replacing the transition:

(s2, a, s3)

With the transition:

(s2, c, s3)

It works again.

The code snippet becomes:

from pythomata import SimpleDFA
alphabet = {"a", "b", "c"}
states = {"s1", "s2", "s3"}
initial_state = "s1"
accepting_states = {"s3"}
transition_function = {
    "s1": {
        "b" : "s1",
        "a" : "s2"
    },
    "s2": {
        "c" : "s3",
        "b" : "s1"
    },
    "s3":{
        "c" : "s3"
    }
}
dfa = SimpleDFA(states, alphabet, initial_state, accepting_states, transition_function)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions