Skip to content

Commit

Permalink
replace eval
Browse files Browse the repository at this point in the history
  • Loading branch information
git2samus committed Jul 22, 2013
1 parent 6f94619 commit 0ea795f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unicards/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ def unicard(card, color=False):
if card[:2] == '10':
card = 'T' + card[2]
face, suit = card.upper()
c = eval("u'\\U0001f0{}{}'".format(
c = unichr(int("0001f0{}{}".format(
SUITS[1][SUITS[0].index(suit)],
FACES[1][FACES[0].index(face)]
))
), base=16))
if color:
c = (suit in 'HD' and RED or BLACK) + c + RESET
return c

0 comments on commit 0ea795f

Please sign in to comment.