Referring to the original post:

> >>> dir(B)
> ['__doc__', '__module__']
> >>> dir(B)
> ['__class__', '__delattr__', '__dict__', '__doc__', '__getattribute__',
> '__hash__', '__init__', '__module__', '__new__', '__reduce__',
> '__reduce_ex__', '__repr__', '__setattr__', '__str__', '__weakref__']
>
>

On Nov 15, 2007 6:50 PM, Kent Johnson <[EMAIL PROTECTED]> wrote:

> OK, the analogy is cute, but I really don't know what it means in
> Python. Can you give an example? What are the parts of an old-style
> class that have to be 'ordered' separately? How do you 'order' them
> concisely with a new-style class?
>
> Thanks,
> Kent
>
> Marc Tompkins wrote:
> > I thought of an analogy I like better than my sign-painting one:
> > ordering a sandwich.
> > Imagine: you're at the deli, and your waitron asks what you want.
> > (Granted, this is a silly example.)
> >   "Classic" order: "I'd like a sandwich with two slices of rye bread,
> > Russian dressing, corned beef, and Swiss cheese.  Oh, and I'd like that
> > grilled."
> >   "New-style" order: "Reuben, please."
> >
> > Now, I speak not of the time and materials required to construct the
> > above-mentioned tasty treat - in my analogy, Python is the
> > long-suffering waitron, not the cook - but I gotta figure that the
> > second option will take less space to write on the check.  Perhaps about
> > 134 bytes' worth.
>



-- 
www.fsrtechnologies.com
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to