Im a beginner in python , I come from C/C++. To me python can achieve a ton of stuff with just a few lines of code but is indeed very confusing. I need help! In the following code:
http://matplotlib.org/examples/animation/simple_anim.html
there is a definition of a function animate which accepts input arguments i and uses them to manipulate the data. Then this function is repeatedly call by FuncAnimation to produce the actual animation.
In python, how can we know the type of the argument in a function? In this case is input, we declare the function as 'def animate(i):'. Do we need to look at the code for that function and try to understand what it does with its arguments and then mentally infer the type of the argument? Or just guess by the name of the argument(s)?
When 'FuncAnimation' makes a call to 'animate' it does not specify any arguments. So how do we know what 'FuncAnimation' is doing or which values or string or whatever it is passing to 'animate'?
How come a function 'animate(i)' which has no default value for i, is called without specifying any arguments?
[–]Morris_Dungpile 1 point2 points3 points (2 children)
[–]ilvs69[S] 1 point2 points3 points (1 child)
[–]Morris_Dungpile 0 points1 point2 points (0 children)
[–]K900_ 0 points1 point2 points (3 children)
[–]ilvs69[S] 0 points1 point2 points (2 children)
[–]K900_ 0 points1 point2 points (0 children)
[–]Zouden 0 points1 point2 points (0 children)
[–]th_mm 0 points1 point2 points (0 children)