Skip to content

Make a good use of the EmptySetError in EnumeratedSets and Parent #10651

Closed
@sagetrac-nborie

Description

@sagetrac-nborie

As Florent Hivert gave extremely useful features about empty things, we should use it. The Following should returns an EmptySetError

sage: S = Set([])
sage: S.an_element()
---------------------------------------------------------------------------
StopIteration                             Traceback (most recent call last)

...


StopIteration: 
sage: 

Also, make the EmptySetError being documented already in the structure of Parent. Improve the documentation of an_element and _an_element_ in Parent.

CC: @sagetrac-sage-combinat

Component: categories

Keywords: days28, empty set, EmptySetError

Author: Nicolas Borie, Nicolas M. Thiéry

Reviewer: Paul Zimmermann, Robert Bradshaw, Nicolas Borie, Nicolas M. Thiéry

Merged: sage-4.7.alpha3

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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions