On Fri, Feb 15, 2013 at 3:09 PM, Simon King <simon.k...@uni-jena.de> wrote: > Hi Robert, > > On 2013-02-15, Robert Bradshaw <rober...@math.washington.edu> wrote: >> It'd be a good idea to install some hooks/deprecation warnings to see >> what remains to be done, but the goal of check_old_coerce is to make >> these methods inaccessible to classes claiming to use the new coercion >> model. >> >>> But would it seem so hopeless to try and merge parent_old.Parent and >>> parent.Parent into one class? >> >> No! parent_old.Parent is the set of things that we want to delete. >> It's an adapter to things that used the old model(s) to co-operate >> with the new. >> >> Essentially, everything in parent_old, parent_gens, and parent_base >> should go away. All their methods are (or should be) guarded by >> check_old_coerce() so that their functionality is never used by >> anything in the new coercion model. We can't remove it now as some >> stuff still uses it, but we shouldn't copy this crufty mess somewhere >> more permanent (without a compelling reason and further discussion at >> least). > > Ah, check_old_coerce is supposed to avoid that the *new* stuff uses the > old methods?
Exactly. > I originally thought it is a remainder, such as "I still > use the old coercion model---please refactor me". > > But then the error message is misleading, because it > complains "... is still using the old coercion model". To the very > least, one could rephrase "... is using the new coercion model and > should thus not call this method". It was supposed to be interpreted as "is still using the methods/infrastructure from the old coercion model" +1 to making the error message clearer. > In any case, I think it does not make sense to check_old_coerce in the > generic gen() method, which simply raises an error anyway -- because > actually gen() is a required method, that needs to be implemented in a > sub-class. The design of the "new coercion model" gens() was never completed, let alone its implementation. Perhaps ParentWithGens should stick around... (All Parents now have a base, so ParentWithBase is obsolete, we could consider moving the gens() infrastructure higher as well.) ParentWithMultiplicativeAbelianGens and kin should probably be removed and handled by the category framework. - Robert -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.