It may be worth mentioning that pandas Categoricals are mutable and
zero-based:
https://pandas-docs.github.io/pandas-docs-travis/categorical.html
Serialization to SQL and CSV is (also?) lossy, though:
-
https://pandas-docs.github.io/pandas-docs-travis/categorical.html#getting-data-in-out
-
https:/
On 06/29/2016 03:40 PM, Roberto Martínez wrote:
Why the 'start' parameter default is 1? 0 (zero) is more consistent with
other parts of the language: indexes, enumerate, range...
An excerpt from [1]:
The reason for defaulting to 1 as the starting number and not 0 is that 0 is
False in a boo
Why the 'start' parameter default is 1? 0 (zero) is more consistent with
other parts of the language: indexes, enumerate, range...
El mié., 29 de jun. de 2016 21:26, Ethan Furman
escribió:
> On 06/29/2016 12:11 PM, Guido van Rossum wrote:
>
> > And how would you implement that without support fr
> Presumably you want a bitfield enum, and those should descend from
IntEnum.
Yes, and probably having an AutoNumberIntEnum would indeed be too much
magic in one place.
Anyway, it is easy to implement bitfield IntEnum without magic.
To be clear, I like the Ethan's original proposal.
--
Ivan
>
On 06/29/2016 01:01 PM, Ivan Levkivskyi wrote:
It looks like the values in AutoNumberEnum are consecutive integers
1,2,3,...
Have you considered an option (keyword argument) to change this to
powers of two 1,2,4,8,...?
Why would you want that? I remind you that this descends from Enum, so
it
On 06/29/2016 01:01 PM, Ivan Levkivskyi wrote:
It looks like the values in AutoNumberEnum are consecutive integers
1,2,3,...
Have you considered an option (keyword argument) to change this to
powers of two 1,2,4,8,...?
There is another issue relating to bitwise enums that deals with that.
It
It looks like the values in AutoNumberEnum are consecutive integers
1,2,3,...
Have you considered an option (keyword argument) to change this to powers
of two 1,2,4,8,...?
--
Ivan
On 29 June 2016 at 21:23, Ethan Furman wrote:
> On 06/29/2016 12:11 PM, Guido van Rossum wrote:
>
> And how would
On 06/29/2016 12:11 PM, Guido van Rossum wrote:
And how would you implement that without support from the compiler?
Does it use a hook that catches the NameError?
It's built into the _EnumDict class dictionary used during class creation.
Current (edited) code from the aenum package that imple
On 06/29/2016 11:15 AM, Brett Cannon wrote:
On Wed, 29 Jun 2016 at 10:41 Ethan Furman wrote:
There is a several-month-old request to add aenum's [1] AutoNumberEnum
to the stdlib [2].
The requester and two of the three developers of Enum are in favor (the
third hasn't chimed in yet).
This new
And how would you implement that without support from the compiler?
Does it use a hook that catches the NameError?
On Wed, Jun 29, 2016 at 11:15 AM, Brett Cannon wrote:
>
>
> On Wed, 29 Jun 2016 at 10:41 Ethan Furman wrote:
>>
>> There is a several-month-old request to add aenum's [1] AutoNumber
I know this is of fairly limited interest, so this is just advertising
http://bugs.python.org/issue27417 where I propose enabling COM by
default on startup.
If you are someone who knows what CoInitializeEx is or why you may want
to call it, I'm interested in your feedback/concerns. Come and po
On Wed, 29 Jun 2016 at 10:41 Ethan Furman wrote:
> There is a several-month-old request to add aenum's [1] AutoNumberEnum
> to the stdlib [2].
>
> The requester and two of the three developers of Enum are in favor (the
> third hasn't chimed in yet).
>
> This new addition would enable the followin
There is a several-month-old request to add aenum's [1] AutoNumberEnum
to the stdlib [2].
The requester and two of the three developers of Enum are in favor (the
third hasn't chimed in yet).
This new addition would enable the following:
from Enum import AutoNumberEnum
class Color(AutoNu
13 matches
Mail list logo