On Fri, 26 Jul 2013 13:21:47 -0700, cerr wrote:
> or should I just write my own dump function that can hanle thiS?
>
> Please advise!
Given the choice between reading the documentation to pickle.dump:
help(pickle.dump)
or spending the next month writing a replacement for pickle, testing it,
On Fri, Jul 26, 2013 at 9:21 PM, cerr wrote:
> >>> mylist = []
> >>> mydict = {}
> >>> mylist = '1','2'
Side point: mylist is no longer a list, it's a tuple. I don't think
pickle has problems with tuples, but it's worth noting that
difference.
ChrisA
--
http://mail.python.org/mailm
cerr wrote:
> Hi,
>
> Can I somehow use pickle.dump() to store a dictionary of lists to a file?
> I tried this:
>
> >>> import pickle
> >>> mylist = []
> >>> mydict = {}
> >>> mylist = '1','2'
> >>> mydict['3'] = mylist
> >>> fhg = open ("test", 'w')
> >>> pickle.dump(
In cerr
writes:
> Can I somehow use pickle.dump() to store a dictionary of lists to a file?
> I tried this:
> >>> import pickle
> >>> mylist = []
> >>> mydict = {}
> >>> mylist = '1','2'
> >>> mydict['3'] = mylist
> >>> fhg = open ("test", 'w')
> >>> pickle.dump(fhg
Hi,
Can I somehow use pickle.dump() to store a dictionary of lists to a file?
I tried this:
>>> import pickle
>>> mylist = []
>>> mydict = {}
>>> mylist = '1','2'
>>> mydict['3'] = mylist
>>> fhg = open ("test", 'w')
>>> pickle.dump(fhg,mydict)
Traceback (most rece
Thanks to all for their kind help and time.
Alok
On Wed, May 28, 2008 at 4:11 AM, Peter Otten <[EMAIL PROTECTED]> wrote:
> Gary Herron wrote:
>
> > Alok Kumar wrote:
> >> Dear All,
> >>
> >> I am using dictionary for filling my xpath parsed data.
> >>
> >> I wanted to use in the following manner
On May 28, 3:11 am, Peter Otten <[EMAIL PROTECTED]> wrote:
> Gary Herron wrote:
> > Alok Kumar wrote:
> >> Dear All,
>
> >> I am using dictionary for filling my xpath parsed data.
>
> >> I wanted to use in the following manner.
>
> >> mydict[index] ["key1"] ["key2"] #Can someone help me with rig
Gary Herron wrote:
> Alok Kumar wrote:
>> Dear All,
>>
>> I am using dictionary for filling my xpath parsed data.
>>
>> I wanted to use in the following manner.
>>
>> mydict[index] ["key1"] ["key2"]#Can someone help me with right
>> declaration.
>>
>> So that I can fill my XML xpath parsed dat
Gary Herron <[EMAIL PROTECTED]> writes:
> mydict[(0,"person","setTime")] = "12:09:30"
> mydict[(0,"person","clrTime")] = "22:09:30"
Note that this is more succinctly written as:
mydict[0, "person", "setTime"] = "12:09:30"
with the added advantage that it looks like a multi-dimensional array
Alok Kumar wrote:
Dear All,
I am using dictionary for filling my xpath parsed data.
I wanted to use in the following manner.
mydict[index] ["key1"] ["key2"]#Can someone help me with right
declaration.
So that I can fill my XML xpath parsed data
mydict[0] ["person"] ["setTime"] = "12:0
Dear All,
I am using dictionary for filling my xpath parsed data.
I wanted to use in the following manner.
mydict[index] ["key1"] ["key2"]#Can someone help me with right
declaration.
So that I can fill my XML xpath parsed data
mydict[0] ["person"] ["setTime"] = "12:09:30"
mydict[0] ["perso
11 matches
Mail list logo