Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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?