Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
src/sage/sets/set.py (Set): Pass input through if it is a Set_parent …
Browse files Browse the repository at this point in the history
…of the right category
  • Loading branch information
mkoeppe committed Aug 31, 2022
1 parent 83c5ec0 commit 8d7518b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/sage/sets/set.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,11 @@ def Set(X=None, category=None, universe=None, facade=None):
sage: Set()
{}
"""
if isinstance(X, Set_parent) and category is None:
return X
if isinstance(X, Set_parent):
if category is None:
category = Sets()
if X.category().is_full_subcategory(category):
return X

if universe is not None:
if facade is False:
Expand Down

0 comments on commit 8d7518b

Please sign in to comment.