Title: Message
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
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to