[Tutor] Memory consumption question
kent37 at tds.net
Fri Nov 16 03:50:16 CET 2007
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?
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
> "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.
More information about the Tutor