HenryRLee / PokerHandEvaluator

Poker-Hand-Evaluator: An efficient poker hand evaluation algorithm and its implementation, supporting 7-card poker and Omaha poker evaluation
Apache License 2.0
381 stars 83 forks source link

'type' object is not subscriptable----PYTHON #72

Closed vinoshuai-NLP closed 1 year ago

vinoshuai-NLP commented 1 year ago

Thanks for your contributions.

When I implemented it using python 3.8, I meet the bug:

/usr/local/lib/python3.8/dist-packages/phevaluator/init.py in 1 """Package for evaluating a poker hand.""" ----> 2 from . import hash as hash_ # FIXME: hash collides to built-in function 3 from . import tables 4 from .card import Card 5 from .evaluator import _evaluate_cards, evaluate_cards

/usr/local/lib/python3.8/dist-packages/phevaluator/hash.py in 3 4 ----> 5 def hash_quinary(quinary: list[int], num_cards: int) -> int: 6 """Hash list of cards. 7

TypeError: 'type' object is not subscriptable

So are there any solutions? THANKS

azriel1rf commented 1 year ago

It would be nice to support Python 3.8. The list[int] caused that error. I am going to fix it.