Title: Signature.html
Unfortunately, I need to stick to 2.4 or possibly 2.5 for awhile. I posted the code.

That's a clever link. It appears it's an easy way to put something on the web that might be sharable with others. This is text, but images would be good. I find it useful to post images of something I'm trying to fix, and an easy visual image can help a lot.

However the post works, it's under my name.

Kent Johnson wrote:
On Sat, Oct 11, 2008 at 12:28 PM, Wayne Watson
<[EMAIL PROTECTED]> wrote:

  
Perhaps at the top of my list is the use of self. I sure get tired of using
it. Maybe there's a short cut.
    

No, no short cut. You can use a different name than 'self', for
example 's', but I don't recommend it; 'self' is pretty universal in
Python.

It's possible you are over-using attributes; values which are only
used in a single method don't have to be attributes.

  
Although I've organized the file data into
records, I still find subscripting fields and data a bit unpleasing. For
example, I used a list of tuples, but I'd list to represent items by names
rather than indicies to enhance readability.
    

Python 2.6 adds a namedtuple function which is useful for this:
http://docs.python.org/library/collections.html#collections.namedtuple

For older versions the Bunch class is handy:
http://code.activestate.com/recipes/52308/

  
If anyone wants to critique what I have, just ask for a copy.
    

You could post it to http://pastebin.com/

Kent

  

--
           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)
            
        "Things are going to get a lot worse befoe they get worse."
                    -- Lily Tomlin
            
                    Web Page: <www.speckledwithstars.net/>
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to