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: |

### Description

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/display_manager.py:570: RichReprWarning: Exception in _rich_repr_ while displaying object: object of type 'NoneType' has no len() RichReprWarning, <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

Branch: | → public/18814 |
---|---|

Commit: | → 2dd3eb6772d0955170def9f3ef2294be12935bce |

Status: | new → needs_review |

### comment:2 follow-up: 3 Changed 7 years ago by

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:4 Changed 7 years ago by

Commit: | 2dd3eb6772d0955170def9f3ef2294be12935bce → c502543abf33d3e6c34d6ed98e46fb76d1a08d9b |
---|

### comment:5 Changed 7 years ago by

Milestone: | sage-6.8 → sage-6.9 |
---|---|

Reviewers: | → Dima Pasechnik |

Status: | needs_review → positive_review |

LGTM

### comment:6 Changed 7 years ago by

Branch: | public/18814 → c502543abf33d3e6c34d6ed98e46fb76d1a08d9b |
---|---|

Resolution: | → fixed |

Status: | positive_review → closed |

**Note:**See TracTickets for help on using tickets.

New commits:

`trac #18814: Polyhedron.delete -> _delete`