On 02/18/2014 11:53 AM, Serhiy Storchaka wrote:
18.02.14 21:20, Guido van Rossum написав(ла):
I'm confused. AFAICT enums are pickled by value too. What am I missing?
Are we confused about terminology or about behavior? (I'm just guessing
that the pickling happens by value because I don't see the
On 02/18/2014 11:37 AM, Guido van Rossum wrote:
Well, I'm against that.
Given the lack of a tidal wave of support for the idea, I'll let it die with
that.
Still, many thanks to Serhiy for greatly improving the way pickling is
implemented for Enums, even using values.
--
~Ethan~
___
Well, I still think it should be done by value.
On Tue, Feb 18, 2014 at 11:53 AM, Serhiy Storchaka wrote:
> 18.02.14 21:20, Guido van Rossum написав(ла):
>
> I'm confused. AFAICT enums are pickled by value too. What am I missing?
>> Are we confused about terminology or about behavior? (I'm just
18.02.14 21:20, Guido van Rossum написав(ла):
I'm confused. AFAICT enums are pickled by value too. What am I missing?
Are we confused about terminology or about behavior? (I'm just guessing
that the pickling happens by value because I don't see the string AF_INET.)
Pickling was not even working
On 02/18/2014 11:20 AM, Guido van Rossum wrote:
I'm confused. AFAICT enums are pickled by value too. What am I missing? Are we
confused about terminology or about
behavior? (I'm just guessing that the pickling happens by value because I don't
see the string AF_INET.)
There's an open issue [1
18.02.14 20:16, Ethan Furman написав(ла):
This conversation wasn't in the PEP, but as I recall we decided to go
with value instead of name for json because the receiving end may not be
running Python.
Is having json do it one way and pickle another a problem?
We decided to go with value instea
Well, I'm against that.
On Tue, Feb 18, 2014 at 11:26 AM, Ethan Furman wrote:
> On 02/18/2014 11:20 AM, Guido van Rossum wrote:
>
>>
>> I'm confused. AFAICT enums are pickled by value too. What am I missing?
>> Are we confused about terminology or about
>> behavior? (I'm just guessing that the
I'm confused. AFAICT enums are pickled by value too. What am I missing? Are
we confused about terminology or about behavior? (I'm just guessing that
the pickling happens by value because I don't see the string AF_INET.)
$ python3
Python 3.4.0rc1+ (default:2ba583191550, Feb 11 2014, 16:05:24)
[GCC
On 02/18/2014 10:05 AM, Guido van Rossum wrote:
Hm. But there's an implementation that has made it unscathed through several
betas and an RC. AFAICT that beta pickles
enums by value. And I happen to think that that is the better choice (but I
don't have time to explain this gut feeling
until af
18.02.14 19:11, Ethan Furman написав(ла):
There is one more wrinkle to pickling by name (it's actually still there
in pickle by value, just more obvious in pickle by name) -- aliases. It
seems to me the most common scenario to having a name represent
different values on different systems is when
Hm. But there's an implementation that has made it unscathed through
several betas and an RC. AFAICT that beta pickles enums by value. And I
happen to think that that is the better choice (but I don't have time to
explain this gut feeling until after 3.4 has been released).
On Tue, Feb 18, 2014 a
On Tue, 18 Feb 2014 10:01:42 -0800
Ethan Furman wrote:
>
> I guess the question is which is more important? Identity comparison or this
> (probably) rare use-case? If we stick
> with identity I'm not aware of any work-around for pickling enum members that
> are aliases on one system, but dis
On 02/18/2014 09:47 AM, Guido van Rossum wrote:
I'm confused. Hasn't this all been decided by the PEP long ago?
The PEP only mentions pickling briefly, as in "the normal rules apply". How pickling occurs is an implementation
detail, and it turns out that pickling by name is more robust.
Se
I'm confused. Hasn't this all been decided by the PEP long ago?
On Tue, Feb 18, 2014 at 9:11 AM, Ethan Furman wrote:
> On 02/15/2014 11:01 AM, Serhiy Storchaka wrote:
>
>> How Enum items should be pickled, by value or by name?
>>
>> I think that Enum will be used to collect system-depending con
On 02/15/2014 11:01 AM, Serhiy Storchaka wrote:
How Enum items should be pickled, by value or by name?
I think that Enum will be used to collect system-depending constants, so the
value of AddressFamily.AF_UNIX can be 1 on
one platform and 2 on other. If pickle enums by value, then pickled
Add
On Sat, 15 Feb 2014 21:01:36 +0200
Serhiy Storchaka wrote:
> How Enum items should be pickled, by value or by name?
>
> I think that Enum will be used to collect system-depending constants, so
> the value of AddressFamily.AF_UNIX can be 1 on one platform and 2 on
> other. If pickle enums by val
How Enum items should be pickled, by value or by name?
I think that Enum will be used to collect system-depending constants, so
the value of AddressFamily.AF_UNIX can be 1 on one platform and 2 on
other. If pickle enums by value, then pickled AddressFamily.AF_INET on
on platform can be unpickl
17 matches
Mail list logo