Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with counters with '-' on name #60

Open
gabrielpreviato opened this issue Aug 15, 2019 · 0 comments
Open

Problem with counters with '-' on name #60

gabrielpreviato opened this issue Aug 15, 2019 · 0 comments
Labels

Comments

@gabrielpreviato
Copy link
Contributor

As stated by @gabrielfedel:

If you define a counter (on config.yml) with '-' on name, like (test-1), and uses a math counter scan will break.

This is related with this line on py4syn:

exec(self.__defineCounters())

This line on py4syn basically executes the dynamically created string with the name of all counters registered in the counterDB. In other words, if there is a counter named "test-1", it will execute:

test-1 = "test-1"

Since Python don't allow variable names with hyphens, this will result in an error. A better implementation of this method should be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant