MCPcopy Create free account
hub / github.com/geekcomputers/Python / __repr__

Method __repr__

BlackJack_game/blackjack_simulate.py:57–61  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

55 self.is_face = face
56
57 def __repr__(self):
58 fmt_card = "\t<rank: {rank:2}, suit: {suit:8}>"
59 if self.is_face:
60 return fmt_card.format(suit=self.suit, rank=self.rank)
61 return fmt_card.format(suit="*-Back-*", rank="*-Back-*")
62
63 def show(self):
64 print(str(self))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected