My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 1941: Objects that know how to combine themselves
10 people starred this issue and may be notified of changes. Back to list
Status:  Valid
Owner:  ----

Blocked on:
issue 1884
issue 1908

Blocking:
issue 1336
issue 3121

Restricted
  • Only users with Commit permission may comment.


Sign in to add a comment
 
Project Member Reported by asmeurer@gmail.com, May 15, 2010
This is related to issue 1908.  When I met with Ondrej last summer, we worked on a core where 
objects knew how to combine themselves with respect to Mul and Add.  See the handler branch at 
http://github.com/certik/sympyx/.  The idea originally stemmed from issue 1336, but we soon 
discovered that it also simplifies the logic for things like O() (the order function), and oo, which 
combine abnormally with respect to Mul and Add.  This could also be useful for issue 1940, so that 
the units could tell Mul that they need to stay together without Mul explicitly having to know about 
units.  Right now, Mul.flatten is cluttered with code for handling all these things, and the only way 
to handle additional classes is to either completely separate them from Basic (as with Poly), or to 
add more special case code in Mul.flatten.  

Anyway, if we ever rework the core as suggested in issue 1908 or elsewhere, we should also look 
into doing this too.  
May 14, 2011
Project Member #1 asmeurer@gmail.com
(No comment was entered for this change.)
Blockedon: 1884
Jun 24, 2011
Project Member #2 asmeurer@gmail.com
(No comment was entered for this change.)
Blocking: 1860
Oct 11, 2011
Project Member #3 matt...@gmail.com
(No comment was entered for this change.)
Blocking: -1860
Oct 27, 2011
Project Member #4 asmeurer@gmail.com
(No comment was entered for this change.)
Labels: CodeInCategory-Research CodeInDifficulty-Hard
Oct 27, 2011
Project Member #5 matt...@gmail.com
(No comment was entered for this change.)
Owner: ---
Oct 30, 2011
Project Member #6 asmeurer@gmail.com
(No comment was entered for this change.)
Labels: CodeInImportedIntoSpreadsheet
Nov 2, 2011
Project Member #7 Ronan.L...@gmail.com
 Issue 576  has been merged into this issue.
Nov 20, 2011
Project Member #8 asmeurer@gmail.com
(No comment was entered for this change.)
Labels: -codeinimportedintospreadsheet CodeInImportedIntoMelange
Mar 9, 2012
Project Member #9 asmeurer@gmail.com
(No comment was entered for this change.)
Blocking: 3121
Mar 20, 2012
Project Member #10 asmeurer@gmail.com
(No comment was entered for this change.)
Status: Valid
Aug 25, 2012
Project Member #11 asmeurer@gmail.com
(No comment was entered for this change.)
Labels: DeprecationRemoval
Aug 27, 2012
Project Member #12 asmeurer@gmail.com
Oops.  That should be issue 1491.
Labels: -DeprecationRemoval
Blockedon: -sympy:1884 -sympy:1908 sympy:1884 sympy:1908
Sep 8, 2012
Project Member #13 asmeurer@gmail.com
See https://github.com/sympy/sympy/wiki/Canonicalization for some more discussion on this.
Oct 22, 2012
Project Member #14 asmeurer@gmail.com
(No comment was entered for this change.)
Labels: -CodeInImportedIntoMelange
Blocking: -sympy:1336 -sympy:3121 sympy:1336 sympy:3121
Oct 29, 2012
Project Member #15 krastano...@gmail.com
It does not make sense for GCI anymore.
Labels: -CodeInCategory-Research -CodeInDifficulty-Hard
Feb 15, 2013
Project Member #16 asmeurer@gmail.com
It just occured to me that this same kind of idea could be applied to the printer. For example, at https://github.com/sympy/sympy/pull/1788, we special case Function, Atom, and Operator in print_Pow, making everything else use parentheses.  But what if some object wanted to define it's own power printing representation.  What is needed is a way for it to consistently say, "object A should print like this when it contains me".
Apr 10, 2013
Project Member #17 MRock...@gmail.com
Sets know how to combine themselves with pairwise intersections and unions.  It really does simplify the canonicalization process and greatly improves extension.

See any ._intersect and ._union methods in sets as well as Union.reduce and Intersection.reduce 
Mar 5, 2014
Project Member #18 asmeurer@gmail.com
We have moved issues to GitHub https://github.com/sympy/sympy/issues. 
Labels: Restrict-AddIssueComment-Commit
Apr 6, 2014
Project Member #19 skirpic...@gmail.com
Migrated to http://github.com/sympy/sympy/issues/5040
Sign in to add a comment

Powered by Google Project Hosting