Opened 3 years ago

Last modified 4 months ago

#27861 new enhancement

Polymake: Better syntax to call functions with <template arguments>

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-9.7
Component: packages: experimental Keywords:
Cc: SimonKing, jipilab, dimpase Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by mkoeppe)

Currently we have to write:

sage: polymake("tropical::uniform_linear_space<Max>(3,2)")


sage: getattr(polymake, "tropical::uniform_linear_space<Max>")(3, 2)


sage: polymake.function_call("tropical::uniform_linear_space<Max>", [3, 2])

because the template brackets cannot become part of the Python function name, so the normal . syntax cannot work. (Also, but not the point of this ticket - #27736: Polymake: Turn polymake applications into objects with directories.)



does not work. It looks for an overloaded function without arguments, which fails:

    TypeError: no matching overloaded instance of Polymake::tropical::uniform_linear_space<Max>()


sage:"tropical::uniform_linear_space<Max>", 3, 2)

does not work -- the undocumented and untested call method passes the args tuple to function_call, which expects lists instead of tuples.

Change History (9)

comment:1 Changed 3 years ago by embray

  • Milestone sage-8.8 deleted

As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9).

comment:2 Changed 3 years ago by mkoeppe

  • Description modified (diff)

comment:3 Changed 3 years ago by mkoeppe

  • Description modified (diff)

comment:4 Changed 2 years ago by mkoeppe

  • Milestone set to sage-9.2

Moving some tickets to 9.2. This is not a promise that I will be working on them.

comment:5 Changed 22 months ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3

comment:6 Changed 17 months ago by mkoeppe

  • Milestone changed from sage-9.3 to sage-9.4

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

comment:7 Changed 11 months ago by mkoeppe

  • Milestone changed from sage-9.4 to sage-9.5

comment:8 Changed 7 months ago by mkoeppe

  • Milestone changed from sage-9.5 to sage-9.6

comment:9 Changed 4 months ago by mkoeppe

  • Milestone changed from sage-9.6 to sage-9.7
Note: See TracTickets for help on using tickets.