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

Incorrect type for LogTracer functions? #6

Open
MarkKoz opened this issue Jul 28, 2019 · 1 comment
Open

Incorrect type for LogTracer functions? #6

MarkKoz opened this issue Jul 28, 2019 · 1 comment

Comments

@MarkKoz
Copy link
Member

MarkKoz commented Jul 28, 2019

LogTracer.set()'s parameter has a type of string but the print functions use any. All functions seem to have the same general purpose: to log the argument given Well, which type is it then? Is set() really meant to have a different type than the rest?

@64json
Copy link
Member

64json commented Jul 28, 2019

I designed that way so that LogTracer.set() directly sets the string value that will be displayed whereas the print functions convert the value to string and then append it to the displayed value. However, I agree that LogTracer.set() should also convert any value to string first before setting it in order to not confuse users. You can make LogTracer.set() in tracers.py have any parameter. I'll fix it in tracers.js and algorithm-visualizer.

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

No branches or pull requests

2 participants