> As an example: IMO KleinFourGroup() should be groups.KleinFour() just like > we have graphs.PetersenGraph().
I completely agree. For coding theory, we have also started to put everything into catalogues codes.<tab> and channels.<tab>, and the functions and constructors in global namespace are slowly getting deprecated - except LinearCode that we have kept globally. I think a lot more things in Sage generally should be put into catalogues. Like the is_prime_* variants. I think it makes sense to present the broad, general functions/constructions in global namespace, e.g. is_prime, Graph, etc. > Could he have something like "import number_theory_special"? So one could > kind of expose more functions to global namespace according to what one > needs. For the catalogue for codes, you can write sage: from sage.coding.codes_catalogue import * This is written in the documentation of codes?. Generally catalogue modules allow that. Best, Johan Jori Mäntysalo writes: > On Wed, 6 Apr 2016, Bruno Grenet wrote: > >> to take into account the fact that 12.is_pri<tab> offers no completion > > I guess this could be handled as a special case, but then we should also > have 12.is_prime? and 12.is_prime??. > >>> Would this be useful for others as a direct function of Sage? And if so, >>> should it be available both as unitary_divisors(60) and >>> 60.unitary_divisors()? > >> My two cents: It can be useful to some people so I'm in favor of adding it, >> but I am against "polluting" the namespace with it since it is quite >> specific. > >> More generally, I do not know if there is a general policy for putting or >> not >> some methods in the global namespace. > > I think that we have no policy yet. Developer manual just says "- - > listing imports from that directory that are important enough to be in the > Sage’s global namespace at startup.", not saying what things are so > important. > > As an example: IMO KleinFourGroup() should be groups.KleinFour() just like > we have graphs.PetersenGraph(). > > Could he have something like "import number_theory_special"? So one could > kind of expose more functions to global namespace according to what one > needs. -- -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.