|   | 1 |  initial version  | 
You can save your file with the .sage extension and then load it in Sage using load('myfile.sage').  Then, your function should work as you have written it. 
 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.
 
                
                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.