mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Ran 2to3 on pysollib/[a-g]*.py
This commit is contained in:
parent
9f8adfe4c8
commit
890a948d8b
2 changed files with 7 additions and 5 deletions
|
@ -31,7 +31,6 @@ import traceback
|
|||
from pysollib.mygettext import _
|
||||
|
||||
from gettext import ungettext
|
||||
from cStringIO import StringIO
|
||||
|
||||
# PySol imports
|
||||
from pysollib.mfxutil import Pickler, Unpickler, UnpicklingError
|
||||
|
@ -62,9 +61,12 @@ from pysollib.hint import DefaultHint
|
|||
from pysollib.help import help_about
|
||||
|
||||
if sys.version_info > (3,):
|
||||
from io import StringIO
|
||||
basestring = str
|
||||
long = int
|
||||
xrange = range
|
||||
else:
|
||||
from cStringIO import StringIO
|
||||
|
||||
PLAY_TIME_TIMEOUT = 200
|
||||
|
||||
|
@ -825,7 +827,7 @@ class Game:
|
|||
else:
|
||||
# new group
|
||||
sg[s] = [s.id]
|
||||
sg = sg.values()
|
||||
sg = list(sg.values())
|
||||
self.sn_groups = sg
|
||||
# print sg
|
||||
|
||||
|
|
|
@ -449,7 +449,7 @@ class GameInfo(Struct):
|
|||
# keyword arguments:
|
||||
si={}, category=0,
|
||||
short_name=None, altnames=(),
|
||||
suits=range(4), ranks=range(13), trumps=(),
|
||||
suits=list(range(4)), ranks=list(range(13)), trumps=(),
|
||||
rules_filename=None,
|
||||
):
|
||||
#
|
||||
|
@ -636,11 +636,11 @@ class GameManager:
|
|||
|
||||
def getAllGames(self):
|
||||
# return self.__all_games
|
||||
return self.__games.values()
|
||||
return list(self.__games.values())
|
||||
|
||||
def getGamesIdSortedById(self):
|
||||
if self.__games_by_id is None:
|
||||
l = self.__games.keys()
|
||||
l = list(self.__games.keys())
|
||||
l.sort()
|
||||
self.__games_by_id = tuple(l)
|
||||
return self.__games_by_id
|
||||
|
|
Loading…
Add table
Reference in a new issue