Add docstrings and doctests to pbot.py + Python cleanups.
[poker.git] / deck.py
diff --git a/deck.py b/deck.py
index 4f1ca92dbdcc813479adc67d94fbb1dc2d8a3767..364f0e743d39a02dda7434a8344d3162fcdb0906 100644 (file)
--- a/deck.py
+++ b/deck.py
@@ -12,7 +12,7 @@ FACE_CARDS = ['ten', 'jack', 'queen', 'king', 'ace']
 """Ordered list of face cards.
 """
 
-DECK = dict([(c/4, c%4) for c in range(52)])
+DECK = [(c/4, c%4) for c in range(52)]
 """Cards in the deck are stored as (n,m), where `n` is the rank number
 `n=[0,12]`, and `m` is the suit `m=[0,3]`.
 
@@ -20,6 +20,8 @@ Examples:
  (0,1)  is a two of hearts, 
  (11,0) is a king of spades,
  (12,3) is an ace of clubs
+
+>>> DECK[:5]
 """