On Saturday, March 28, 2015 at 2:02:19 AM UTC-7, Martin R wrote: > > Hi there! > > I need help with two questions for an interface (to the FindStat database) > I'm writing on http://trac.sagemath.org/ticket/17818. > > a design question: it appears that, in sage, python properties are hardly > used at all. Since the interface allows submitting edits to entries, it > seemed natural to use properties. Eg., "statistic.description = ..." will > set the description of a statistic, and "statistic.submit()" will then > submit it for review by the FindStat people. >
One reason why Sage shies away from using properties is that it is harder to access the documentation for them. Compare sage: A.access_function? versus sage: A.property (the latter one already executed before you could get your hands on the object that gets executed) Properties (implemented on cython level) can have some modest efficiency benefits, because one can usually avoid an extra level of attribute lookup with them, but I don't think that is a concern in your code. -- 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 http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.