[Tutor] General Information Request

Lane, Frank L frank.l.lane at boeing.com
Tue Sep 6 22:02:50 CEST 2005


Hi List,
 
I wanted to write to ask about help reading the Python documentation.
 
I found a really neat technique on the web using a built in called
"apply", with it you can do struct.pack() using an array for the values.
I can't find the technique in the release documentation and what's there
says apply is deprecated, use the new function (**args, *kwargs) or
something like that.  That has to be one of the most inscrutable things
I've ever seen in print.
 
I also saw a technique for building a dictionary out of two arrays,
which I also can't read:
    dict([(['one', 'two'][i-2], i) for i in (2,3)])
 
Is this just something that I have to get accustomed to or are there
pointers that help us read python-speak better?
 
Any explanation of the usage of function and the loop for building
dictionaries will be greatly appreciated!
 
Thanks,
Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050906/9c49dcab/attachment.htm


More information about the Tutor mailing list