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

Commit

Permalink
use _get_object so that an import actually gets triggered (attribut…
Browse files Browse the repository at this point in the history
…e lookup is not sufficient)
  • Loading branch information
nbruin authored and Matthias Koeppe committed Dec 18, 2022
1 parent 5764c34 commit 2a352f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sage/combinat/partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
from sage.structure.unique_representation import UniqueRepresentation
from sage.symbolic.ring import var

from sage.misc.lazy_import import lazy_import, LazyImport, attributes
from sage.misc.lazy_import import lazy_import, LazyImport
lazy_import('sage.combinat.skew_partition', 'SkewPartition')
lazy_import('sage.combinat.partition_tuple', 'PartitionTuple')

Expand Down Expand Up @@ -5814,7 +5814,7 @@ def __classcall_private__(cls, n=None, **kwargs):
raise ValueError("n cannot be infinite")
# n is prone to being a LazyImport shim, so we have to unpack in that case
if type(n) is LazyImport:
n = attributes(n)['_object']
n = n._get_object()
if n is None or n is NonNegativeIntegerSemiring() or n is NonNegativeIntegers():
if len(kwargs) > 0:
if len(kwargs) == 1:
Expand Down

0 comments on commit 2a352f3

Please sign in to comment.