Bug: AttributeError: module 'sys' has no attribute 'MAXSIZE' in BlackJackHand.score

Author: cynicalmindsetCreated Sep 28, 2026Updated Sep 28, 2026

Expected Behavior

Calling score() on a BlackJackHand in solutions/object_oriented_design/deck_of_cards/deck_of_cards.py and deck_of_cards.ipynb should calculate the optimal blackjack score using Python's standard library integer maximum (sys.maxsize).

Actual Behavior

Calling score() crashes immediately with:

AttributeError: module 'sys' has no attribute 'MAXSIZE'

Source: donnemartin/system-design-primer