Re: [Python-Dev] PEP 461 and __imod__

2015-01-17 Thread Ethan Furman
On 01/17/2015 07:12 PM, Ethan Furman wrote:
>
> I have % (__mod__) working for both bytes and bytearray (yay!), but I cannot 
> find
> nor figure out how to tell the bytearray object that 'xyz' is the __imod__ 
> function.
> 
> Any pointers?

I think I found a clue in Objects/floatobject.c:

static PyNumberMethods float_as_number = {
float_add,  /*nb_add*/
float_sub,  /*nb_subtract*/
float_mul,  /*nb_multiply*/
float_rem,  /*nb_remainder*/
float_divmod,   /*nb_divmod*/
float_pow,  /*nb_power*/
(unaryfunc)float_neg, /*nb_negative*/
(unaryfunc)float_float, /*nb_positive*/
(unaryfunc)float_abs, /*nb_absolute*/
(inquiry)float_bool, /*nb_bool*/
0,  /*nb_invert*/
0,  /*nb_lshift*/
0,  /*nb_rshift*/
0,  /*nb_and*/
0,  /*nb_xor*/
0,  /*nb_or*/
float_trunc,/*nb_int*/
0,  /*nb_reserved*/
float_float,/*nb_float*/
0,  /* nb_inplace_add */
0,  /* nb_inplace_subtract */
0,  /* nb_inplace_multiply */
0,  /* nb_inplace_remainder */
0,  /* nb_inplace_power */
0,  /* nb_inplace_lshift */
0,  /* nb_inplace_rshift */
0,  /* nb_inplace_and */
0,  /* nb_inplace_xor */
0,  /* nb_inplace_or */
float_floor_div, /* nb_floor_divide */
float_div,  /* nb_true_divide */
0,  /* nb_inplace_floor_divide */
0,  /* nb_inplace_true_divide */
};

Guess I'll see if it seg faults.  ;)

--
~Ethan~



signature.asc
Description: OpenPGP digital signature
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] PEP 461 and __imod__

2015-01-17 Thread Ethan Furman
I have % (__mod__) working for both bytes and bytearray (yay!), but I cannot 
find nor figure out how to tell the
bytearray object that 'xyz' is the __imod__ function.

Any pointers?

--
~Ethan~





signature.asc
Description: OpenPGP digital signature
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] hg vs Github [was: PEP 481 - Migrate Some Supporting Repositories to Git and Github]

2015-01-17 Thread Wes Turner
Links to OT (pending a mailman upgrade with auto-appended links):

https://mail.python.org/pipermail/python-dev/2014-November/137283.html

https://mail.python.org/pipermail/python-dev/2014-December/thread.html#137381

http://westurner.github.io/wiki/ideas#open-source-mailing-list-extractor
(sphinx + github wiki repo)
On Dec 1, 2014 11:37 AM, "Jim J. Jewett"  wrote:

>
>
>
> M. Cepl asked:
>
> > What I really don't understand is why this discussion is hg v.
> > GitHub, when it should be hg v. git. Particular hosting is
> > a secondary issue
>
> I think even the proponents concede that git isn't better enough
> to justify a switch in repositories.
>
> They do claim that GitHub (the whole environment; not just the
> hosting) is so much better that a switch to GitHub is justified.
>
> Github + hg offers far fewer benefits than Github + git, so also
> switching to git is part of the price.  Whether that is an
> intolerable markup or a discount is disputed, as are the value
> of several other costs and benefits.
>
> -jJ
>
> --
>
> If there are still threading problems with my replies, please
> email me with details, so that I can try to resolve them.  -jJ
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/wes.turner%40gmail.com
>
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] hg vs Github [was: PEP 481 - Migrate Some Supporting Repositories to Git and Github]

2015-01-17 Thread anatoly techtonik
On Mon, Dec 1, 2014 at 8:37 PM, Jim J. Jewett  wrote:
>
>> What I really don't understand is why this discussion is hg v.
>> GitHub, when it should be hg v. git. Particular hosting is
>> a secondary issue
>
> I think even the proponents concede that git isn't better enough
> to justify a switch in repositories.
>
> They do claim that GitHub (the whole environment; not just the
> hosting) is so much better that a switch to GitHub is justified.
>
> Github + hg offers far fewer benefits than Github + git, so also
> switching to git is part of the price.  Whether that is an
> intolerable markup or a discount is disputed, as are the value
> of several other costs and benefits.

git - GitHub < hg + hgweb
GitHub + hg < hg + hgweb
GitHub + git > hg + hgweb
GitHub + git <= hg + hgweb + Roundup
GitHub + git < hg + hgweb + Roundup + Rietveld

(GitHub + git) * Python = 0
(hg + hgweb) * Python = 1


There is also a question of support. Obviously Roundup will degrade
over time if there is economic support for coordination action for
people working on it, no matter how strong is their open source and
community spirits. It was fun back in the days, but now time control
and "human resource mining" techniques are so perfect that I hardly
imagine someone to have free time to work on community open
source projects.

With no time to support our own dogfood, the community will have
to switch to GitHub sooner or later, because that is the thing that
saves time so valuable. GitLab could be a open source alternative
if Python community chooses to be more tolerant to use Ruby tools
dogfood in its ecosystem.
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com