Ask Your Question

KevinShaffer's profile - activity

2024-03-03 04:02:08 +0100 received badge  Taxonomist
2023-07-02 17:20:58 +0100 received badge  Student (source)
2020-01-19 18:18:35 +0100 received badge  Famous Question (source)
2018-05-24 02:54:30 +0100 received badge  Notable Question (source)
2015-09-15 15:39:54 +0100 received badge  Popular Question (source)
2013-06-14 17:21:06 +0100 asked a question How can you stop warnings from printing?

I am writing a quick and dirty poker program in python, and am getting a warning when doing:

def is_there_a_pair(hand,values=False):
    if values: vals = hand
    else:
        vals = [val for (val,suit) in hand]
    for item in arrangements(vals,2):
        if item[0] == item[1]:
            return item

The warning is the following: sagePoker.py:24: DeprecationWarning: Use Arrangements(mset,k).list() instead. See http://trac.sagemath.org/13821 for details.

But if I do the .list() method, I get this error. AttributeError: 'list' object has no attribute 'list'

Which makes me think doing .list() is useless

What do I do to either fix that erro from happening, or stop errors from printing?