Opened 7 years ago

Closed 7 years ago

#18814 closed defect (fixed)

Polyhedron.delete -> _delete

Reported by: Nathann Cohen Owned by:
Priority: major Milestone: sage-6.9
Component: geometry Keywords:
Cc: Vincent Delecroix, Dima Pasechnik, Volker Braun Merged in:
Authors: Nathann Cohen Reviewers: Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: c502543 (Commits, GitHub, GitLab) Commit: c502543abf33d3e6c34d6ed98e46fb76d1a08d9b
Dependencies: Stopgaps:

Status badges


From the doc of Polyhedron.delete (which is a immutable/hashable object):

        Delete this polyhedron.

        This speeds up creation of new polyhedra by reusing
        objects. After recycling a polyhedron object, it is not in a
        consistent state any more and neither the polyhedron nor its
        H/V-representation objects may be used any more.

This really shouldn't be exposed at user level:

sage: p = polytopes.cube()
sage: p.delete()
sage: p
/home/ncohen/.Sage/local/lib/python2.7/site-packages/sage/repl/rich_output/ RichReprWarning: Exception in _rich_repr_ while displaying object: object of type 'NoneType' has no len()
<repr(<sage.geometry.polyhedron.backend_ppl.Polyhedra_ZZ_ppl_with_category.element_class at 0x7f1f17c92c30>) failed: TypeError: object of type 'NoneType' has no len()>

Change History (6)

comment:1 Changed 7 years ago by Nathann Cohen

Branch: public/18814
Commit: 2dd3eb6772d0955170def9f3ef2294be12935bce
Status: newneeds_review

New commits:

2dd3eb6trac #18814: Polyhedron.delete -> _delete

comment:2 Changed 7 years ago by Volker Braun

Renaming it doesn't really address your point that it is immutable.

I also thought we are all consenting adults.

I agree that a better implementation should be provided, but just renaming it is not doing anything.

comment:3 in reply to:  2 Changed 7 years ago by Nathann Cohen

What exactly do you want?

comment:4 Changed 7 years ago by git

Commit: 2dd3eb6772d0955170def9f3ef2294be12935bcec502543abf33d3e6c34d6ed98e46fb76d1a08d9b

Branch pushed to git repo; I updated commit sha1. New commits:

5bcf79fMerge branch 'public/18814' into 6.9.b4
c502543trac #18814 fixing doctest continuation

comment:5 Changed 7 years ago by Dima Pasechnik

Milestone: sage-6.8sage-6.9
Reviewers: Dima Pasechnik
Status: needs_reviewpositive_review


comment:6 Changed 7 years ago by Volker Braun

Branch: public/18814c502543abf33d3e6c34d6ed98e46fb76d1a08d9b
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.