Re: Dictionary from String?

2011-05-09 Thread python
On May 9, 9:33 pm, python wrote: > On May 8, 12:43 pm, Benjamin Kaplan wrote: > > > > > > > > > > > On Sun, May 8, 2011 at 8:20 AM, Greg Lindstrom > > wrote: > > > Is it possible to create a dictionary from a string value?  Something > > > along > > > these lines (but that works): > > > m

Re: Dictionary from String?

2011-05-09 Thread python
On May 8, 12:43 pm, Benjamin Kaplan wrote: > On Sun, May 8, 2011 at 8:20 AM, Greg Lindstrom wrote: > > Is it possible to create a dictionary from a string value?  Something along > > these lines (but that works): > > mystring = "{'name':'greg','hatsize':'7 5/8'}" > mystring > > "{'name'

Re: Re: Dictionary from String?

2011-05-08 Thread gslindstrom
On May 8, 2011 2:00pm, Dan Stromberg wrote: On Sun, May 8, 2011 at 8:20 AM, Greg Lindstrom gslindst...@gmail.com> wrote: Is it possible to create a dictionary from a string value? Something along these lines (but that works): >>> mystring = "{'name':'greg','hatsize':'7 5/8'}" >>> mystri

Re: Dictionary from String?

2011-05-08 Thread Dan Stromberg
On Sun, May 8, 2011 at 8:20 AM, Greg Lindstrom wrote: > Is it possible to create a dictionary from a string value? Something along > these lines (but that works): > > >>> mystring = "{'name':'greg','hatsize':'7 5/8'}" > >>> mystring > "{'name':'greg','hatsize':'7 5/8'}" > >>> dict(mystring) > Tra

Re: Dictionary from String?

2011-05-08 Thread Benjamin Kaplan
On Sun, May 8, 2011 at 8:20 AM, Greg Lindstrom wrote: > Is it possible to create a dictionary from a string value?  Something along > these lines (but that works): > mystring = "{'name':'greg','hatsize':'7 5/8'}" mystring > "{'name':'greg','hatsize':'7 5/8'}" dict(mystring) > Traceb

Re: Dictionary from String?

2011-05-08 Thread Chris Angelico
On Mon, May 9, 2011 at 1:20 AM, Greg Lindstrom wrote: > Is it possible to create a dictionary from a string value?  Something along > these lines (but that works): > mystring = "{'name':'greg','hatsize':'7 5/8'}" mystring > "{'name':'greg','hatsize':'7 5/8'}" dict(mystring) > Traceb