Hi

On Mon, 5 Dec 2022 at 09:38, Nils Bruin <nbr...@sfu.ca> wrote:

> On Sunday, 4 December 2022 at 23:15:35 UTC-8 axio...@yahoo.de wrote:
>
>> I accidentally opened a new ticket https://trac.sagemath.org/ticket/34824,
>> which is essentially ready for review.  There is another problem, which I
>> do not understand, which may be dealt with in the same ticket, if it is
>> easy:
>>
>> sage: P = ParkingFunctions(4)
>> sage: B = P([1, 2, 3, 4, 5, 6])
>> sage: B.parent()
>> Parking functions of size 4
>> sage: B in P
>> False
>>
>> I think P.__contains__ contains the answer to that one:
>
> sage: len(B) == P.n
> False
>
> I suppose B shouldn't be allowed to have P as a parent anyway? This just
> looks like shoddy programming -- it looks like you should give
> ParkingFunctions a thorough review before trusting what they produce, and
> ideally fix the issues you find for the benefit of people who come after
> you.
>

Note sage 9.2 (debian package) gives an error (sage 9.7 does not):

0 jan@jan-desktop:~$sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.2, Release Date: 2020-10-24                     │
│ Using Python 3.9.2. Type "help()" for help.                        │
└────────────────────────────────────────────────────────────────────┘
sage: P = ParkingFunctions(4)
....: B = P([1, 2, 3, 4, 5, 6])
....:
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-1-7be5289b850e> in <module>
      1 P = ParkingFunctions(Integer(4))
----> 2 B = P([Integer(1), Integer(2), Integer(3), Integer(4), Integer(5),
Integer(6)])

/usr/lib/python3/dist-packages/sage/combinat/combinat.py in __call__(self,
x)
   1737             return self._element_constructor_(x)
   1738         else:
-> 1739             raise ValueError("%s not in %s" % (x, self))
   1740
   1741     Element = CombinatorialObject # mostly for backward
compatibility

ValueError: [1, 2, 3, 4, 5, 6] not in Parking functions of size 4
sage:

Regards,
Jan



-- 
  .~.
  /V\     Jan Groenewald
 /( )\    www.aims.ac.za
 ^^-^^

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAAg%3Dp_2FrAAiB7U9yE5YNGumyS1rLkL6xHsFq_OvaG61v3tFAQ%40mail.gmail.com.

Reply via email to