Given how elegant python is for the rest, I am probably missing the proper "pythonic" way of creating the sequence below.
I was interested in elliptic curves with possible 9-torsion in Sha, so I figured querying Cremona's database would get me some examples. After some experimenting, I finally created a query that had the desired result: sage: DB = CremonaDatabase() sage: L = [ N.str()+c[0] for N in (lambda l: xrange(l[0],l[1])) (DB.conductor_range()) for c in DB.allbsd(N).items() if round(RDF(c[1][4]))%81 == 0] Two things made me feel uncomfortable with this expression: - the whole lambda expression to make the pair output by DB.conductor_range() into an iterable. Is there a syntactically more pleasing construct in python for that? (for instance variables local to expressions. In Magma speak: "[a..b] where (a,b)=DB.conductor_range()") - the round(RDF(c[1][4])) to make the "analytic sha" into an integer. Am I missing something? --~--~---------~--~----~------------~-------~--~----~ 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 URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---