On 08/06/13 15:18, Stephen J. Turnbull wrote:
Ethan Furman writes:
> Enumerations can be pickled and unpickled::
>
> >>> from enum import Enum
> >>> class Fruit(Enum):
> ... tomato = 1
> ... banana = 2
> ... cherry = 3
> ...
> >>>
Ethan Furman writes:
> Enumerations can be pickled and unpickled::
>
> >>> from enum import Enum
> >>> class Fruit(Enum):
> ... tomato = 1
> ... banana = 2
> ... cherry = 3
> ...
> >>> from pickle import dumps, loads
> >>> Fruit.tomato
On Fri, Jun 7, 2013 at 5:16 PM, Łukasz Langa wrote:
> On 7 cze 2013, at 22:50, PJ Eby wrote:
>
>> On Fri, Jun 7, 2013 at 10:27 AM, Thomas Wouters wrote:
>>> This isn't a new bug, but it's exposed by always importing weakref and
>>> atexit during interpreter startup. I'm wondering if that's reall
On 7 cze 2013, at 22:50, PJ Eby wrote:
> On Fri, Jun 7, 2013 at 10:27 AM, Thomas Wouters wrote:
>> This isn't a new bug, but it's exposed by always importing weakref and
>> atexit during interpreter startup. I'm wondering if that's really necessary
>> :)
>
> In short, the overall answer right n
On Fri, Jun 7, 2013 at 10:27 AM, Thomas Wouters wrote:
> This isn't a new bug, but it's exposed by always importing weakref and
> atexit during interpreter startup. I'm wondering if that's really necessary
> :)
Importing it during startup isn't necessary per se; imports needed
only by the generic
On 7 cze 2013, at 16:27, Thomas Wouters wrote:
>
> On Wed, Jun 5, 2013 at 3:20 AM, lukasz.langa
> wrote:
> +from weakref import WeakKeyDictionary
>
> This isn't a new bug, but it's exposed by always importing weakref and atexit
> during interpreter startup. I'm wondering if that's really ne
On Jun 07, 2013, at 02:30 PM, PJ Eby wrote:
>I don't know if enums *actually* preserve this invariant, but my
>default expectation of the One Obvious Way would be that enums, being
>uniquely-named objects that know their name and container, should be
>considered global objects in the same fashion
On Jun 07, 2013, at 09:06 AM, Ethan Furman wrote:
>Oh, and I just realized this is probably why the flufl.enum docs import from
>a preexisting module instead of creating a new class on the spot.
Exactly. ;)
-Barry
___
Python-Dev mailing list
Python-Dev
>> Why are you using is here instead of ==?
>
>
> I'm using `is` because I'm verifying that the instance returned by
> `pickle.loads` is the exact same object as the instance fed into
> `pickle.dumps`. Enum members should be singletons.
I see now. That makes sense, but I don't think you'll be ab
On Fri, Jun 7, 2013 at 1:54 PM, Mark Janssen wrote:
> On Fri, Jun 7, 2013 at 10:50 AM, Mark Janssen
> wrote:
>>> >>> from pickle import dumps, loads
>>> >>> Fruit.tomato is loads(dumps(Fruit.tomato))
>>> True
>>
>> Why are you using is here instead of ==? You're making a circular
>>
On 06/07/2013 10:54 AM, Mark Janssen wrote:
On Fri, Jun 7, 2013 at 10:50 AM, Mark Janssen wrote:
>>> from pickle import dumps, loads
>>> Fruit.tomato is loads(dumps(Fruit.tomato))
True
Why are you using is here instead of ==? You're making a circular
loop using "is"
I should
On Fri, Jun 7, 2013 at 10:27 AM, Thomas Wouters wrote:
>
> On Wed, Jun 5, 2013 at 3:20 AM, lukasz.langa
> wrote:
>
>> +from weakref import WeakKeyDictionary
>>
>
> FYI, this change exposes a bug in the atexit module involving
> subinterpreters, causing the refleaks reported by Antoine's daily re
On 06/07/2013 10:50 AM, Mark Janssen wrote:
>>> from pickle import dumps, loads
>>> Fruit.tomato is loads(dumps(Fruit.tomato))
True
Why are you using is here instead of ==?
I'm using `is` because I'm verifying that the instance returned by `pickle.loads` is the exact same objec
On 06/07/2013 09:54 AM, Olemis Lang wrote:
On 6/7/13, Ethan Furman wrote:
Is there a doctest mailing list? I couldn't find it.
JFTR, Testing-in-Python (TiP) ML should be the right target for
general purpose questions about testing, considering docs even for
unittest and doctest
http://lists
On Fri, 07 Jun 2013 10:54:57 -0700, Mark Janssen
wrote:
> On Fri, Jun 7, 2013 at 10:50 AM, Mark Janssen
> wrote:
> >> >>> from pickle import dumps, loads
> >> >>> Fruit.tomato is loads(dumps(Fruit.tomato))
> >> True
> >
> > Why are you using is here instead of ==? You're making a c
On Fri, Jun 7, 2013 at 10:50 AM, Mark Janssen wrote:
>> >>> from pickle import dumps, loads
>> >>> Fruit.tomato is loads(dumps(Fruit.tomato))
>> True
>
> Why are you using is here instead of ==? You're making a circular
> loop using "is"
I should add that when you're serializing with
> >>> from pickle import dumps, loads
> >>> Fruit.tomato is loads(dumps(Fruit.tomato))
> True
Why are you using is here instead of ==? You're making a circular
loop using "is"
--
MarkJ
Tacoma, Washington
___
Python-Dev mailing list
Python-D
On 6/7/13, Ethan Furman wrote:
> Is there a doctest mailing list? I couldn't find it.
>
JFTR, Testing-in-Python (TiP) ML should be the right target for
general purpose questions about testing, considering docs even for
unittest and doctest
http://lists.idyll.org/listinfo/testing-in-python
[...]
Is there a doctest mailing list? I couldn't find it.
I'm try to use doctest to verify my docs (imagine that!) but I'm having trouble with the one that uses pickle (imagine
that!).
Any advice on how to make it work?
Here's the excerpt:
===
ACTIVITY SUMMARY (2013-05-31 - 2013-06-07)
Python tracker at http://bugs.python.org/
To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.
Issues counts and deltas:
open4024 (+27)
closed 25905 (+21)
total 29929 (+48)
Open issues wit
I just used the build system on the 3.4.0 docs, and some of the library modules (haven't checked the others) have the
TOC showing up at the bottom of the page instead of the top.
Am I doing something wrong?
--
~Ethan~
___
Python-Dev mailing list
Pytho
On Fri, Jun 7, 2013 at 5:16 PM, Brett Cannon wrote:
> I think this CL introduced a memory leak. The daily leak report went from
> 0 to not 0 between June 4 and June 5 and this is the only CL that touched C
> code.
>
It wasn't introduced by C code :) The refleak report is induced by the PEP
443 i
I think this CL introduced a memory leak. The daily leak report went from 0
to not 0 between June 4 and June 5 and this is the only CL that touched C
code.
On Wed, Jun 5, 2013 at 6:31 PM, richard.oudkerk
wrote:
> http://hg.python.org/cpython/rev/0410bf251e10
> changeset: 84045:0410bf251e10
> u
On Wed, Jun 5, 2013 at 3:20 AM, lukasz.langa wrote:
> +from weakref import WeakKeyDictionary
>
FYI, this change exposes a bug in the atexit module involving
subinterpreters, causing the refleaks reported by Antoine's daily report:
interpreter startup now always imports weakref, which imports atex
24 matches
Mail list logo