Re: writing pickle function

2009-01-23 Thread Steve Holden
Peter Otten wrote: > Steve Holden wrote: > >> Peter Otten wrote: >>> perfr...@gmail.com wrote: >>> i am using nested defaultdict from collections and i would like to write it as a pickle object to a file. when i try: from collections import defaultdict x = defaultdict(lamb

Re: writing pickle function

2009-01-23 Thread Peter Otten
Steve Holden wrote: > Peter Otten wrote: >> perfr...@gmail.com wrote: >> >>> i am using nested defaultdict from collections and i would like to >>> write it as a pickle object to a file. when i try: >>> >>> from collections import defaultdict >>> x = defaultdict(lambda: defaultdict(list)) >>> >>>

Re: writing pickle function

2009-01-23 Thread Steve Holden
Peter Otten wrote: > perfr...@gmail.com wrote: > >> i am using nested defaultdict from collections and i would like to >> write it as a pickle object to a file. when i try: >> >> from collections import defaultdict >> x = defaultdict(lambda: defaultdict(list)) >> >> and then try to write to a pick

Re: writing pickle function

2009-01-23 Thread Peter Otten
perfr...@gmail.com wrote: > i am using nested defaultdict from collections and i would like to > write it as a pickle object to a file. when i try: > > from collections import defaultdict > x = defaultdict(lambda: defaultdict(list)) > > and then try to write to a pickle file, it says: > > TypeE

Re: writing pickle function

2009-01-23 Thread Gerard Flanagan
On Jan 23, 2:48 pm, perfr...@gmail.com wrote: > hello, > > i am using nested defaultdict from collections and i would like to > write it as a pickle object to a file. when i try: > > from collections import defaultdict > x = defaultdict(lambda: defaultdict(list)) > > and then try to write to a pick

Re: writing pickle function

2009-01-23 Thread Chris Rebert
On Fri, Jan 23, 2009 at 6:48 AM, wrote: > hello, > > i am using nested defaultdict from collections and i would like to > write it as a pickle object to a file. when i try: > > from collections import defaultdict > x = defaultdict(lambda: defaultdict(list)) > > and then try to write to a pickle f

writing pickle function

2009-01-23 Thread perfreem
hello, i am using nested defaultdict from collections and i would like to write it as a pickle object to a file. when i try: from collections import defaultdict x = defaultdict(lambda: defaultdict(list)) and then try to write to a pickle file, it says: TypeError: can't pickle function objects