Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #80247
| References | <mailman.15454.1415115015.18130.python-list@python.org> <m3bda8$fui$1@reader1.panix.com> <19b75713-78cd-4dad-976d-096653c058de@googlegroups.com> |
|---|---|
| Date | 2014-11-04 22:23 -0800 |
| Subject | Re: Code review |
| From | C Smith <illusiontechniques@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.15478.1415168622.18130.python-list@python.org> (permalink) |
>Jean-Michel wrote: >replace > if left_to_act is None: > left_to_act = [] > self.left_to_act = left_to_act >by > self.left_to_act = left_to_act or [] I read that with 2.7 that I had to initialize class variables to immutable types. I think because I was working with the lists before they had been altered and were still empty lists. I will mess around tomorrow with the classes you suggested as I have yet to make use of decorators. Thanks. I will work on putting some more comments in as well. On Tue, Nov 4, 2014 at 4:09 PM, <sohcahtoa82@gmail.com> wrote: > On Tuesday, November 4, 2014 12:35:32 PM UTC-8, John Gordon wrote: >> C Smith <illusiontechniques@gmail.com> writes: >> >> > I was wondering if I could get some feedback on the biggest thing I >> > have done as an amateur Python coder. >> >> Comments. >> >> You need a *lot* more comments. >> >> Like, every line or two of code should have a comment explaining what is >> being accomplished. Seriously. Every line or two. >> >> Some blank lines wouldn't hurt either. >> >> Also it would be nice to define some of the terms you're using. What is >> a blind? What does "in front" mean? What is a "muck hand"? >> >> -- >> John Gordon Imagine what it must be like for a real medical doctor to >> gordon@panix.com watch 'House', or a real serial killer to watch 'Dexter'. > > A "blind" is a required bet that the two people sitting to the left of the button have to make before a hand begins. The first player pays the small blind and the second player pays the big blind, which is double the small blind. For tournament games, the blinds increase periodically. > > Mucking a hand means to throw your cards away without revealing them. In professional Poker, you typically give them to the dealer. > > "In front" just refers to table position which determines play order. > -- > https://mail.python.org/mailman/listinfo/python-list
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Code review C Smith <illusiontechniques@gmail.com> - 2014-11-04 07:28 -0800
Re: Code review John Gordon <gordon@panix.com> - 2014-11-04 20:35 +0000
Re: Code review sohcahtoa82@gmail.com - 2014-11-04 16:09 -0800
Re: Code review C Smith <illusiontechniques@gmail.com> - 2014-11-04 22:23 -0800
csiph-web