Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #107509
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: A pickle problem! |
| Date | Fri, 22 Apr 2016 14:33:39 -0600 |
| Lines | 23 |
| Message-ID | <mailman.5.1461357262.32212.python-list@python.org> (permalink) |
| References | <nfbhh6$dbd$1@gioia.aioe.org> <nfc04n$u2o$1@gioia.aioe.org> <CALwzidkTeXOMdAkuQ3UdcJhWNUQjzjzp4eZqmSOXtydMurka6w@mail.gmail.com> <mailman.18.1461342496.2861.python-list@python.org> <nfe13p$9p2$1@gioia.aioe.org> <CALwzidkiqMv+wYhEAL26a6TzyUveJA9TaTEyf8Aeaqfrdr54PA@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| X-Trace | news.uni-berlin.de wDhIi0ioccRTjiSzUYBJDA/W6bkbiv946xijhqyzZ6jQ== |
| Return-Path | <ian.g.kelly@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'received:209.85.223': 0.03; '21,': 0.07; 'attributes': 0.07; '22,': 0.09; 'derived': 0.09; 'dict': 0.09; 'thu,': 0.15; '2016': 0.16; 'customizing': 0.16; 'paulo': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subclasses.': 0.16; 'underscores': 0.16; 'wrote:': 0.16; '>>>': 0.20; 'keys': 0.22; 'subject:problem': 0.22; 'header:In-Reply- To:1': 0.24; 'fri,': 0.27; 'possibility': 0.27; 'message- id:@mail.gmail.com': 0.27; "skip:' 10": 0.28; 'looks': 0.29; 'pickle': 0.29; 'probably': 0.31; 'class': 0.33; 'list': 0.34; 'received:google.com': 0.35; 'could': 0.35; 'instance': 0.35; 'there': 0.36; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'two': 0.37; 'no,': 0.38; 'received:209': 0.38; 'thank': 0.38; 'to:addr:python.org': 0.40; 'your': 0.60; 'behavior': 0.61; 'you.': 0.64; 'account': 0.66; 'to:name:python': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=Yrx6YU0XEfbqIVMWpBdaBZO0Ktf07wD4hx5yUIcRj6c=; b=XkQPeoQ/VND80Ivp8hGfAStRtqE3aK5GX4QVLoChYBuS1w02eREs6RX4lhQFfWVcu0 eVQ/WpFOSlbaoDnTLVF6KSMqJdbb5ZnDvN0zKPz0Z8JbNaCXYa/QY9QWhIH5/sMAlDKU 4yxkBLzh8e5QjtrXq0VbqL1lNGBsbojrSJXqKPGZTjAz/h9+ldKX3yjlAPeo2BXYiUt3 UMU0zfkwZ4Af5O84vTJWSqvkKqVunHP4ap1muQ1OnJSIfNbzPnBnnHCYAFsheItbAKv0 KdIi3wzSnRyp4lhOII/Zz1RyXHpsD4kNreUbD+dsfXtGYPEJS6g5CwgMyrZTN9n90RhT LLlA== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=Yrx6YU0XEfbqIVMWpBdaBZO0Ktf07wD4hx5yUIcRj6c=; b=hLwhKF0inm1OoYaQPqs2BXsh2+Ay5WoDNWmO2bptixC79EW5iR4Ve0L/NwF8qlC7/g heav9Y9Tjs7awOIjmpgd7TTS7nsWbfRZEehBUc34cWKxtwprB5L9/9P4oBbLpWRaIKeo C1djE0r8ylwXdNYMg/nbKKC0g1YL3zHJxLXo97/x6k/h4dUAIAJInnWff/ZlXAiUzGnn +sjBq98CQOXje/wgeCKCsIXQ8K75uXJvVhYxPqocpjwVTfjxL5sL0QfNtIZtc4KxfZ6N CgWV9SHyE8WcOVfhcPF4XTXOtT2M+D1L9spYn399wQZhvj/UFg3vBlAdXEHdz6iWgZq2 yKcA== |
| X-Gm-Message-State | AOPr4FWAEXW4k5G486qO7xomBdLNob7DsnejfgZNLeZ/j/ayEi4zv5IFtnjSwMcPfZ6bMJ/p6s2RJHsWm+M5kg== |
| X-Received | by 10.107.10.87 with SMTP id u84mr25515270ioi.188.1461357259129; Fri, 22 Apr 2016 13:34:19 -0700 (PDT) |
| In-Reply-To | <nfe13p$9p2$1@gioia.aioe.org> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.22 |
| 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> |
| X-Mailman-Original-Message-ID | <CALwzidkiqMv+wYhEAL26a6TzyUveJA9TaTEyf8Aeaqfrdr54PA@mail.gmail.com> |
| X-Mailman-Original-References | <nfbhh6$dbd$1@gioia.aioe.org> <nfc04n$u2o$1@gioia.aioe.org> <CALwzidkTeXOMdAkuQ3UdcJhWNUQjzjzp4eZqmSOXtydMurka6w@mail.gmail.com> <mailman.18.1461342496.2861.python-list@python.org> <nfe13p$9p2$1@gioia.aioe.org> |
| Xref | csiph.com comp.lang.python:107509 |
Show key headers only | View raw
On Fri, Apr 22, 2016 at 2:21 PM, Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> wrote: > Às 17:27 de 22-04-2016, Ian Kelly escreveu: >> On Thu, Apr 21, 2016 at 7:52 PM, Paulo da Silva >> <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> wrote: >>> Às 22:43 de 21-04-2016, Paulo da Silva escreveu: > ... > >> >> Probably this is necessary because the DataFrame class is already >> customizing its pickle behavior without taking into account the >> possibility of added attributes by subclasses. I think that your >> solution of wrapping the state of the superclass looks fine. >> > Thank you. > > For any other vars ... > Is there a way to get the vars of only the derived class? If they start with two underscores then you could use the name mangling to find them. If the class name is MyClass then look for any keys in the instance dict that start with '_MyClass__'. Otherwise no, you'd have to list them explicitly.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
A pickle problem! Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2016-04-21 22:43 +0100
Re: A pickle problem! Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2016-04-22 02:52 +0100
Re: A pickle problem! Ian Kelly <ian.g.kelly@gmail.com> - 2016-04-22 10:27 -0600
Re: A pickle problem! Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2016-04-22 21:21 +0100
Re: A pickle problem! Ian Kelly <ian.g.kelly@gmail.com> - 2016-04-22 14:33 -0600
Re: A pickle problem! Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2016-04-22 21:48 +0100
Re: A pickle problem! Fabien <fabien.maussion@gmail.com> - 2016-04-24 12:20 +0200
csiph-web