Comment on revision r5fdbdfa41e6c86596180a756eed389927ab6c2bd in pychess

1 view
Skip to first unread message

pyc...@googlecode.com

unread,
May 26, 2014, 7:07:05 PM5/26/14
to pychess-c...@googlegroups.com
Comment by matt...@gmail.com:

General Comment:
Not to be pedantic, but couldn't the LBoard.py changes be written more
concisely as:

# Get information
parts = fenstr.split()
castChr = "-"
epChr = "-"
fiftyChr = "0"
moveNoChr = "1"
if STRICT_FEN and len(parts) != 6:
raise SyntaxError, _("FEN needs 6 data fields. \n\n%s") % fenstr
elif len(parts) < 2:
raise SyntaxError, _("FEN needs at least 2 data fields in
fenstr. \n\n%s") % fenstr
elif len(parts) >= 6:
pieceChrs, colChr, castChr, epChr, fiftyChr, moveNoChr =
parts[:6]
elif len(parts) == 5:
pieceChrs, colChr, castChr, epChr, fiftyChr = parts
elif len(parts) == 4:
pieceChrs, colChr, castChr, epChr = parts
elif len(parts) == 3:
pieceChrs, colChr, castChr = parts
else:
pieceChrs, colChr = parts

For more information:
https://code.google.com/p/pychess/source/detail?r=5fdbdfa41e6c86596180a756eed389927ab6c2bd

pyc...@googlecode.com

unread,
May 27, 2014, 2:36:53 AM5/27/14
to pychess-c...@googlegroups.com
Comment by gbtami:

General Comment:
Done. Thx. Matt!
Reply all
Reply to author
Forward
0 new messages