Hi,
using sage 3.1.3,
the following works fine:
sage: def fun(time = 5):
....: time = RDF(time)
....: return time
....:
sage: fun(3)
3.0
if you write this function into a script called 'time.sage', loading
this script then yields:
sage: load time.sage
------------------------------------------------------------
File "/home/georg/.sage/temp/HILBERT/30804/
_home_georg_Daten_Sync_Software_Sage_Experimente_time_time_sage_6.py",
line 7
__time__=misc.cputime(); __wall__=misc.walltime(); = RDF(time);
print "Time: CPU %.2f s, Wall: %.2f s"%(misc.cputime(__time__),
misc.walltime(__wall__))
^
SyntaxError: invalid syntax
WARNING: Failure executing file: </home/georg/.sage/temp/HILBERT/30804/
_home_georg_Daten_Sync_Software_Sage_Experimente_time_time_sage_6.py>
if you quit the space between 'time' and '=' it works also in the
script.
Georg
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---