Newsgroups: comp.lang.python
From: Steve Howell <showel...@yahoo.com>
Date: Sat, 26 May 2007 18:48:45 -0700 (PDT)
Local: Sun, May 27 2007 11:48 am
Subject: Re: ten small Python programs
--- Paul McGuire <pt...@austin.rr.com> wrote: > I ***love*** this "10 Little Programs" idea! As Thanks. :) > soon as I get a > breathing space, I'm going to add a "10 Little > Parsers" page to the > pyparsing wiki! I'm thinking you could actually have a progression > > > class ShoppingCart: > If you want to nitpick, I'd rather go after the > How's this for a better non-trivial method example: Yep, that sounds more in the ballpark of what I'd want > MAX_ITEMS_FOR_EXPRESS_LANE = 10 > or call it "can_use_express_lane" if you must. to show, versus a weakish class that just encapulates a list. Here's my challenge to whoever wants to take it--write The tutorial has this example, which is useful for class MyClass: It also has a ComplexNumber class, but I don't want to It does have this idiom, which I think is worth class Employee: john = Employee() # Create an empty employee record # Fill the fields of the record ___________________________________________________________________________ _________Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||