Hi, On Aug 17, 2011, at 00:20 , pong wrote:
> [radical(k) for k in [1..30]] produces the expected list however > > [radical(k) for k in range(1,31)] rises an error > > AttributeError: 'int' object has no attribute 'factor' The problem here is the distinction between Python 'int's and Sage 'Integer's. You can get the effect you want by using 'srange' (which returns a list of the latter instead of the former): sage: [radical(k) for k in srange(1,31)] [1, 2, 3, 2, ... 3, 14, 29, 30] (there's also an 'xsrange' (or 'sxrange'). I don't know that there is a good way to "fix" this issue. HTH Justin -- Justin C. Walker Curmudgeon at Large Director Institute for the Enhancement of the Director's Income -- Build a man a fire and he'll be warm for a night. Set a man on fire and he'll be warm for the rest of his life. -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org