Re: Wanted: Criticism of code for a Python module, plus a Mac tester

2012-02-16 Thread Arnaud Delobelle
On 16 February 2012 05:03, Ian Kelly wrote: > On Wed, Feb 15, 2012 at 6:11 PM, HoneyMonster > wrote: >> As to your first suggestion though, I am having some difficulty. Note >> that the vulnerability rotates; i.e. CONDITIONS[4] is not the same as >> CONDITIONS[0]. >> Is there a better way of doi

Re: Wanted: Criticism of code for a Python module, plus a Mac tester

2012-02-15 Thread Ian Kelly
On Wed, Feb 15, 2012 at 6:11 PM, HoneyMonster wrote: > As to your first suggestion though, I am having some difficulty. Note > that the vulnerability rotates; i.e. CONDITIONS[4] is not the same as > CONDITIONS[0]. > Is there a better way of doing it than a simple list.append()? Ah, it's more comp

Re: Wanted: Criticism of code for a Python module, plus a Mac tester

2012-02-15 Thread HoneyMonster
On Wed, 15 Feb 2012 17:07:48 -0700, Ian Kelly wrote: > On Wed, Feb 15, 2012 at 4:33 PM, HoneyMonster > wrote: >> Secondly, as a more general point I would welcome comments on code >> quality, adherence to standards and so forth. The code is at: > > Looks pretty nice overall. To reduce repetitio

Re: Wanted: Criticism of code for a Python module, plus a Mac tester

2012-02-15 Thread Tim Chase
On 02/15/12 17:33, HoneyMonster wrote: Firstly, is there anyone here who uses Python on a Mac and would be prepared to test it? I have tested it on Linux and Windows, but don't have access to a Mac. It works from my quick test of it on my Mac. The "class Player():" and the .format() calls cho

Re: Wanted: Criticism of code for a Python module, plus a Mac tester

2012-02-15 Thread Ian Kelly
On Wed, Feb 15, 2012 at 4:33 PM, HoneyMonster wrote: > Secondly, as a more general point I would welcome comments on code > quality, adherence to standards and so forth. The code is at: Looks pretty nice overall. To reduce repetition, I would have constructed the CONDITIONS list by iteration lik

Wanted: Criticism of code for a Python module, plus a Mac tester

2012-02-15 Thread HoneyMonster
I am quite new to Python (running Python 2.7 on Linux). I have written a very small and simple dealing module for the game of Bridge. For those unfamiliar with the game, the idea is to deal each of 4 players a hand of 13 cards from a pack of 52, and to display it thus (use a fixed pitch font):