On Sat, Jul 25, 2009 at 7:15 PM, Darth Kaboda <darthkab...@msn.com> wrote:
> I'm starting to learn Python as it seems to be adopted by many companies > that I've been looking to apply to. I used the book Learning Phython to get > the basics of the language and many of the gotcha's. I think I know enough > of the basic features of the language to start playing around and can > understand most code I've seen so far by looking at some of the posts here. > > The one worry I have is not coding things the Phython way as I've been a > Visual Basic programmer for so long and a C++ programmer before that. So > would like to have people look at a simplistic class (shuffles lists of > objects wrote it for shuffling cards but with Phython could be used for any > "list" type object) I wrote to give me some feedback on the style of it. > > Any feedback is appreciated. > There's a spot in your code that could be turned into a function. I'm not sure what you'd call it, but where you "lay down" 1-4 cards. Since you're doing the same thing for each stack, you may as well turn it into a function and just call it for each stack. Pretty cool idea for something to do, though. -Wayne
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor