Merge pull request #146 from JEHoctor/patch-1

Fix return type and docstring in guess_row function
This commit is contained in:
Peter Norvig
2026-06-03 13:46:17 -07:00
committed by GitHub

View File

@@ -294,8 +294,8 @@
"metadata": {},
"outputs": [],
"source": [
"def guess_row(guess) -> Tuple[Word, int, float, int]:\n",
" \"\"\"A tuple of a (guess word, nuber of guaranteed wins, expected wins, maximum bin size).\"\"\"\n",
"def guess_row(guess) -> Tuple[Word, int, float]:\n",
" \"\"\"A tuple of a (guess word, number of guaranteed wins, expected wins).\"\"\"\n",
" B = bins([guess], words)\n",
" return (guess, sum(len(bin) == 1 for bin in B), sum(1 / len(bin) for bin in B))\n",
"\n",