On Wed, Nov 23, 2011 at 12:03 PM, Cranky Frankie
<[email protected]>wrote:

> [...]
> The reason why I'm "pickling" is I'm trying to include information on
> Python data structures in the presentaton I'm preparing. [...]
>

In your context why not just use modules?


 # data.py
Qb_dict = {"Montana": ["Joe", "Montana", "415-123-4567",
"[email protected]","Candlestick Park"],
"Tarkington": ["Fran", "651-321-7657", "[email protected]",
"Metropolitan Stadidum"],
"Namath": ["Joe", "212-222-7777", "[email protected]", "Shea Stadium"],
"Elway": ["John", "303-9876-333", "[email protected]", "Mile High
Stadium"],
"Elway": ["Ed", "303-9876-333", "[email protected]", "Mile High
Stadium"],
"Manning": ["Archie","504-888-1234", "[email protected]",
"Louisiana Superdome"],
"Staubach": ["Roger","214-765-8989", "[email protected]",
"Cowboy Stadium"]}

# program.py
from data import Qb_dict
print(Qb_dict)

Then you can put whatever comments or data you want. Just make sure that
you don't name your data.py file the same as something built-in. It's
pretty horrible when you try to 'import random' and it doesn't randint() or
anything else that you're looking for.

HTH,
Wayne
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to