| 1 | initial version |
Usually my preferred way to do something like this is use a string formatting substitution. There may be an open ticket for making such things easier, but for now I'd do
sage: for k in range(1001):
function('f_%s'%k,nargs=1)
The percent signs are telling you to append a string, and that the string will the string from the int k, respectively.
I don't think you have to use the f=function('f') syntax in this case; someone correct me if that's not true.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.