You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After saving a function, the function builder appears to insert a newline character to the end of the input/output test fields. If I'm not careful enough with how I take types into consideration, this can cause the function to fail execution.
For example, here's a python script to calculate the n-th Fibonacci number, with rudimentary input controlling to ensure that the input is only 1 number in size:
importsys# only accept 1 argumentiflen(sys.argv) >2:
raiseErrori=int(sys.argv[1])
f0=0f1=1ft=0whilei>0:
i-=1ft=f0+f1f0=f1f1=ftprintft
It works fine in the function builder...
...but once I save it, Clotho will claim that the function failed, and opening up the function shows that a newline character was inserted (the same holds true for the output field as well)
The text was updated successfully, but these errors were encountered:
After saving a function, the function builder appears to insert a newline character to the end of the input/output test fields. If I'm not careful enough with how I take types into consideration, this can cause the function to fail execution.
For example, here's a python script to calculate the n-th Fibonacci number, with rudimentary input controlling to ensure that the input is only 1 number in size:
It works fine in the function builder...
![screenshot_20170919_200816](https://user-images.githubusercontent.com/13266270/30620948-7be329d4-9d76-11e7-8980-b6a83d10f67b.png)
![screenshot_20170919_200853](https://user-images.githubusercontent.com/13266270/30620993-ab3fa932-9d76-11e7-829e-61400ca76f4c.png)
...but once I save it, Clotho will claim that the function failed, and opening up the function shows that a newline character was inserted (the same holds true for the output field as well)
The text was updated successfully, but these errors were encountered: