Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7082939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:07:00+00:00 2026-05-28T07:07:00+00:00

I understood that Python pickling is a way to ‘store’ a Python Object in

  • 0

I understood that Python pickling is a way to ‘store’ a Python Object in a way that does respect Object programming – different from an output written in txt file or DB.

Do you have more details or references on the following points:

  • where are pickled objects ‘stored’?
  • why is pickling preserving object representation more than, say, storing in DB?
  • can I retrieve pickled objects from one Python shell session to another?
  • do you have significant examples when serialization is useful?
  • does serialization with pickle imply data ‘compression’?

In other words, I am looking for a doc on pickling – Python.doc explains how to implement pickle but seems not dive into details about use and necessity of serialization.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:07:01+00:00Added an answer on May 28, 2026 at 7:07 am

    Pickling is a way to convert a python object (list, dict, etc.) into a character stream. The idea is that this character stream contains all the information necessary to reconstruct the object in another python script.

    As for where the pickled information is stored, usually one would do:

    with open('filename', 'wb') as f:
        var = {1 : 'a' , 2 : 'b'}
        pickle.dump(var, f)
    

    That would store the pickled version of our var dict in the ‘filename’ file. Then, in another script, you could load from this file into a variable and the dictionary would be recreated:

    with open('filename','rb') as f:
        var = pickle.load(f)
    

    Another use for pickling is if you need to transmit this dictionary over a network (perhaps with sockets or something.) You first need to convert it into a character stream, then you can send it over a socket connection.

    Also, there is no “compression” to speak of here…it’s just a way to convert from one representation (in RAM) to another (in “text”).

    About.com has a nice introduction of pickling here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone confirm that Python 2.6 ftplib does NOT support Unicode file names? Or
I made some bindings from my C++ app for python. The problem is that
I looked through several SO-Questions for how to pickle a python object and store
I understand that IronPython is an implementation of Python on the .NET platform just
I am trying to understand this simple hashlib code in Python that has been
really can't understand, how to build correctly project that uses boost.python. I've included boost_(python/thread/system)-mt.
I understood that this Bind attribute was not necessary, but JSON type is not
I understood that anonymous types are marked private by the compiler and the properties
I am building a small activex control. I understood that activex cannot call a
What are differences between CallContext and ThreadStatic? I've understood that in an ASP.NET environment

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.