Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #90146

Re: To pickle or not to pickle

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <cfkaran2@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.054
X-Spam-Evidence '*H*': 0.89; '*S*': 0.00; 'subject:not': 0.03; 'json': 0.07; 'cc:addr:python-list': 0.11; 'python': 0.11; 'changes': 0.15; 'for?': 0.16; 'thanks,': 0.17; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'url:moin': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'xml': 0.29; 'url:mailman': 0.30; 'url:wiki': 0.31; 'faster,': 0.31; 'pickle': 0.31; 'url:wikipedia': 0.31; 'url:python': 0.33; 'maybe': 0.34; 'something': 0.35; 'received:google.com': 0.35; 'google': 0.35; 'version': 0.36; 'really': 0.36; 'data,': 0.36; 'module.': 0.36; 'url:listinfo': 0.36; 'charset:us-ascii': 0.36; 'url:org': 0.36; 'should': 0.36; 'message-id:@gmail.com': 0.38; 'depends': 0.38; 'planning': 0.38; 'bad': 0.39; 'url:mail': 0.40; 'read': 0.60; "you're": 0.61; 'first': 0.61; 'header:Message-Id:1': 0.63; 'different': 0.65; 'worth': 0.66; 'again?': 0.84; 'yourself,': 0.95
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=4+X5Zt20JoxgBCInn3a8jwxguW36fTf7/WJHE3Rb/Wc=; b=o2oi2MPjzX/SwL8Xzs3mGwNJmhMyvsTPs7I/KQTUbZEIvK8YW3BNhmH5/46eKK2U9e YIcvq3qjPUCOCq5otbmFkQDVb/8Yq+OczpdNKTVA0L4pzu2Sj4LoY0FlMX8fLGFlQNF7 P475iwvoKuyGvc2xa8yuoGehXjkdPkYYXm2BLbUQ8fXvNX8N1+KwE405UsoCCO6CHsvI ge/p/VumpUVOLbuoppn1XcpW45kb5mxklAWOHPJlNDZkY0DBUmR9Gi8U/ff5ML8W+ZRu fD2vkJcCVjQhc8MJr87PwOiYyZthCmj9v8acLtN/Ex2MNSuK4mH5v4w6Zt2LY6hiTawp YzOQ==
X-Received by 10.52.176.37 with SMTP id cf5mr2435245vdc.9.1431080851354; Fri, 08 May 2015 03:27:31 -0700 (PDT)
Content-Type text/plain; charset=us-ascii
Mime-Version 1.0 (Mac OS X Mail 6.6 \(1510\))
Subject Re: To pickle or not to pickle
From Cem Karan <cfkaran2@gmail.com>
In-Reply-To <87h9rnz8yy.fsf@Equus.decebal.nl>
Date Fri, 8 May 2015 06:27:30 -0400
Cc python-list@python.org
Content-Transfer-Encoding quoted-printable
References <87h9rnz8yy.fsf@Equus.decebal.nl>
To Cecil Westerhof <Cecil@decebal.nl>
X-Mailer Apple Mail (2.1510)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.234.1431084638.12865.python-list@python.org> (permalink)
Lines 30
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1431084638 news.xs4all.nl 2923 [2001:888:2000:d::a6]:57017
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:90146

Show key headers only | View raw


What are you using pickle for?  If this is just for yourself, go for it.  If you're planning on interchanging with different languages/platforms/etc., JSON or XML might be better.  If you're after something that is smaller and faster, maybe MessagePack or Google Protocol Buffers.  If you're after something that can hold a planet's worth of data, maybe HDF5.  It really depends on your use-case.

MessagePack - http://en.wikipedia.org/wiki/MessagePack
Google Protocol Buffers - http://en.wikipedia.org/wiki/Protocol_Buffers
HDF5 - http://en.wikipedia.org/wiki/Hierarchical_Data_Format

Thanks,
Cem Karan

On May 8, 2015, at 5:58 AM, Cecil Westerhof <Cecil@decebal.nl> wrote:

> I first used marshal in my filebasedMessages module. Then I read that
> you should not use it, because it changes per Python version and it
> was better to use pickle. So I did that and now I find:
>    https://wiki.python.org/moin/Pickle
> 
> Is it really that bad and should I change again?
> 
> -- 
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
> -- 
> https://mail.python.org/mailman/listinfo/python-list

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

To pickle or not to pickle Cecil Westerhof <Cecil@decebal.nl> - 2015-05-08 11:58 +0200
  Re: To pickle or not to pickle Peter Otten <__peter__@web.de> - 2015-05-08 12:32 +0200
    Re: To pickle or not to pickle Cecil Westerhof <Cecil@decebal.nl> - 2015-05-08 13:51 +0200
    Re: To pickle or not to pickle Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2015-05-08 19:11 +0200
  Re: To pickle or not to pickle Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-08 20:54 +1000
    Re: To pickle or not to pickle Cecil Westerhof <Cecil@decebal.nl> - 2015-05-08 13:55 +0200
      Re: To pickle or not to pickle Chris Angelico <rosuav@gmail.com> - 2015-05-08 22:53 +1000
        Re: To pickle or not to pickle Cecil Westerhof <Cecil@decebal.nl> - 2015-05-08 16:34 +0200
          Re: To pickle or not to pickle Chris Angelico <rosuav@gmail.com> - 2015-05-09 01:11 +1000
            Re: To pickle or not to pickle Cecil Westerhof <Cecil@decebal.nl> - 2015-05-08 18:43 +0200
  Re: To pickle or not to pickle Cem Karan <cfkaran2@gmail.com> - 2015-05-08 06:27 -0400

csiph-web