On Sat, Mar 21, 2009 at 5:24 PM, Carl Witty <[email protected]> wrote: > > On Mar 20, 5:52 pm, Nils Bruin <[email protected]> wrote: >> 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] > ... >> - 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()") > > Note that you're skipping the last conductor in the database, I > think... DB.conductor_range? indicates that the returned values > represent an inclusive range, but range/xrange/etc. take their second > argument as an exclusive bound. (This is easy to fix with the above > xrange expression, but I don't see how to fix it with the simple *args > syntax.)
If you're using the large database (up to 130000), fortunately there is no curve with that conductor. If you use the small one, then conductor_range()'s top bound is 9999, and there *is* a curve of that conductor. William --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
