sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.47k stars 487 forks source link

polymake: Do not add global functions as member functions #28281

Open mkoeppe opened 5 years ago

mkoeppe commented 5 years ago

Adding the global functions (1) causes some unfortunate clashes (bounding_box example in #22705) and (2) puts a lot of useless member functions in the tab completion of every object.

I assume the decision to add these global functions was done to allow for this:

sage: M = polymake.new_object("Matrix", [[1, 2], [3, 4]])
sage: M.det()
-2

which is not possible in polymake itself, which requires us to use a global function:

sage: polymake.det(M)
-2

This convenience, however, probably does not justify adding hundreds of monstrosities such as M.bipyramid, M.containing_outer_cone to the tab completion of every object.

CC: @simon-king-jena @jplab @dimpase

Component: interfaces: optional

Issue created by migration from https://trac.sagemath.org/ticket/28281

embray commented 4 years ago
comment:1

Ticket retargeted after milestone closed

mkoeppe commented 4 years ago
comment:2

pushing these forward to 9.2

mkoeppe commented 3 years ago
comment:4

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.