Opened 23 months ago
Last modified 8 weeks ago
#27861 new enhancement
Polymake: Better syntax to call functions with <template arguments>
Reported by: | mkoeppe | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-9.4 |
Component: | packages: experimental | Keywords: | |
Cc: | SimonKing, jipilab, dimpase | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
Currently we have to write:
sage: polymake("tropical::uniform_linear_space<Max>(3,2)")
or
sage: getattr(polymake, "tropical::uniform_linear_space<Max>")(3, 2)
or
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.)
Also,
polymake("tropical::uniform_linear_space<Max>")(3,2)
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>()
Also,
sage: polymake.call("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 (6)
comment:1 Changed 22 months ago by
- Milestone sage-8.8 deleted
comment:2 Changed 21 months ago by
- Description modified (diff)
comment:3 Changed 21 months ago by
- Description modified (diff)
comment:4 Changed 11 months ago by
- 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 8 months ago by
- Milestone changed from sage-9.2 to sage-9.3
comment:6 Changed 8 weeks ago by
- 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.
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).