Hi Volker, On 2014-03-09, Volker Braun <vbraun.n...@gmail.com> wrote: > ------=_Part_25_1398588.1394377030563 > Content-Type: text/plain; charset=UTF-8 > > On Sunday, March 9, 2014 2:16:51 PM UTC, Simon King wrote: >> >> class Cs(Category): >> class Finite(CategoryWithAxiom): >> class ParentClass: >> def some_method(self): >> return "I am a finite c" >> is also (I think) *sufficiently* explicit about Cs.Finite() being a >> sub-category of Cs(), defined by the axiom Finite. >> > > This snippet defines a finite axiom that is different from the finite axiom > for sets, and your parents will not have a "is_finite()" method.
The snippet was supposed to be a continuation of the first snipped, which stated that Cs() is a sub-category of Sets(). Sorry for not being clear. > Really, the whole subclass-as-axiom magic is just an attempt at syntactic > sugar. The only thing that matters is that Cs().Finite() returns an > instance of the the axiom. There are various functionally equivalent ways > to implement it. There is yet another syntax to achieve the same end, > namely Cs().with_axiom("Finite"). Except for the strings I would be much > happier with that since it doesn't require an open-ended list of magic > attribute names for axioms. OK, that is the syntax that you want for *using* axioms: Not Cs.Finite() or Cs().Finite(), but Cs.with_axiom("Finite") or even better Cs.with_axiom(axioms.Finite). Fair enough. But your answer is orthogonal to what I was asking you: What syntax to you suggest for *implementing* axioms? Do you think stating that Cs() is a subcategory of Sets() is not good enough for having Cs().Finite() being a sub-category of Sets().Finite()? What else is there to code, in your opinion? Best regards, Simon -- 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.