Re: [sage-devel] Re: RFC: correct way to deal with particular methods

2016-11-08 Thread Erik Bray
On Tue, Nov 8, 2016 at 1:47 PM, Simon King wrote: > Hi Martin, > > On 2016-11-08, 'Martin R' via sage-devel wrote: >> That's actually precisely what I'd like. So, what are metaclass conflicts? > > Many classes in Sage have metaclasses, such as: Everything that inherits > from sage.structure.elem

[sage-devel] Re: RFC: correct way to deal with particular methods

2016-11-08 Thread Simon King
Hi Martin, On 2016-11-08, 'Martin R' via sage-devel wrote: > That's actually precisely what I'd like. So, what are metaclass conflicts? Many classes in Sage have metaclasses, such as: Everything that inherits from sage.structure.element.Element or from sage.structure.unique_representation.Uniqu

Re: [sage-devel] Re: RFC: correct way to deal with particular methods

2016-11-07 Thread Vincent Delecroix
On 7 November 2016 at 14:19, Jeroen Demeyer wrote: > On 2016-11-07 07:00, Nils Bruin wrote: >> >> Why not just make a subclass for the n==2, m==0 case and put the methods >> there? > > > +1 +1 this is cleaner *and* simpler (in the particular case you invoke) -- You received this message because

Re: [sage-devel] Re: RFC: correct way to deal with particular methods

2016-11-07 Thread Jeroen Demeyer
On 2016-11-07 07:00, Nils Bruin wrote: Why not just make a subclass for the n==2, m==0 case and put the methods there? +1 -- 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

[sage-devel] Re: RFC: correct way to deal with particular methods

2016-11-06 Thread Nils Bruin
On Sunday, November 6, 2016 at 3:12:38 PM UTC-8, Salvatore Stella wrote: > > {{{ > if n == 2 and m == 0: > self.greedy_element = MethodType(greedy_element, self, self.__class__) > }}} > > This has at least one drawback: the documentation produced by Sphinx looks > weird because these metho