[Python-Dev] Poll: Py_REPLACE/Py_ASSIGN/etc

2014-02-26 Thread Serhiy Storchaka
There were several suggestions for naming new macros which replace old 
value with new value and then (x)decref old value.


#define Py_XXX(ptr, value)\
{ \
PyObject *__tmp__ = ptr;  \
ptr = new_value;  \
Py_DECREF(__tmp__);   \
}

Listed in order of receipt:

1. Py_(X)SETREF.
2. Py_(X)ASSIGN.
3. Py_(X)DECREC_REPLACE.
4. Py_REF_ASSIGN (Py_XREF_ASSIGN? Py_REF_XASSIGN?).
5. Py_(X)REPLACE.
6. Py_(X)STORE
7. Py_CLEAR_AND_SET.
8. Py_SET_AND_(X)DECREF.
9. Py_(X)DECREF_AND_ASSIGN.
10. Py_ASSIGN_AND_(X)DECREF.
11. Other...

Let's choose the least confusing names.

See discussions at:

http://bugs.python.org/issue3081
http://bugs.python.org/issue16447
http://bugs.python.org/issue20440
http://comments.gmane.org/gmane.comp.python.devel/145346

___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 2

2014-02-26 Thread Stephen J. Turnbull
Nick Coghlan writes:
 > sjt writes:

 > > although introduction of a new format character is a poor man's
 > > consistency, and this is consistency for consistency's sake.  (I don't
 > > have a big problem with that, though.  I *like* consistency!)
 > 
 > It's *not* a new format character, unless you mean "new in Python
 > 3".

Ah, my bad.  Obviously I meant "new to Python 3", and therefore was
just plain wrong.

___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] GSoC 2014 - Email Module

2014-02-26 Thread Surya
On Wed, Feb 26, 2014 at 8:16 AM, Terry Reedy  wrote:

> On 2/25/2014 8:56 PM, Surya wrote:
>
>> Hey there,
>>
>> I am Surya, studying final year of Engineering.  I have looked into Core
>> Python's ideas list and got interested in Email module.
>>
>> I've been working on Django over the past few years, and now like to
>> work on slightly a different layer of protocols and this idea happened
>> to be it.
>>
>> That said, I have been just using the Email module earlier along with
>> other similar modules and never dwell into the internal protocol
>> standards before.
>>
>> It would be great if someone initially can let me know what
>> documentation I should start reading to get up to the speed and probably
>> bugs related to this idea I can look into.
>>
>
> Please sign up for core-mentorship list and ask questions there.


Is this for students too? Because I want to join as a student.​​


>
> --
> Terry Jan Reedy
>
> ___
> Python-Dev mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/
> kasturi.surya%40gmail.com
>
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] GSoC 2014 - Email Module

2014-02-26 Thread Brett Cannon
On Wed, Feb 26, 2014 at 4:46 AM, Surya  wrote:

>
>
>
> On Wed, Feb 26, 2014 at 8:16 AM, Terry Reedy  wrote:
>
>> On 2/25/2014 8:56 PM, Surya wrote:
>>
>>> Hey there,
>>>
>>> I am Surya, studying final year of Engineering.  I have looked into Core
>>> Python's ideas list and got interested in Email module.
>>>
>>> I've been working on Django over the past few years, and now like to
>>> work on slightly a different layer of protocols and this idea happened
>>> to be it.
>>>
>>> That said, I have been just using the Email module earlier along with
>>> other similar modules and never dwell into the internal protocol
>>> standards before.
>>>
>>> It would be great if someone initially can let me know what
>>> documentation I should start reading to get up to the speed and probably
>>> bugs related to this idea I can look into.
>>>
>>
>> Please sign up for core-mentorship list and ask questions there.
>
>
> Is this for students too? Because I want to join as a student.​​
>

The mailing list is for anyone who wants to contribute to Python's
development and wants some help getting started, student or not.
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Poll: Py_REPLACE/Py_ASSIGN/etc

2014-02-26 Thread Ryan Gonzalez
I like Py_DECREF_REPLACE. It gives the impression that it decrefs the
original and replaces it.


On Wed, Feb 26, 2014 at 3:40 AM, Serhiy Storchaka wrote:

> There were several suggestions for naming new macros which replace old
> value with new value and then (x)decref old value.
>
> #define Py_XXX(ptr, value)\
> { \
> PyObject *__tmp__ = ptr;  \
> ptr = new_value;  \
> Py_DECREF(__tmp__);   \
> }
>
> Listed in order of receipt:
>
> 1. Py_(X)SETREF.
> 2. Py_(X)ASSIGN.
> 3. Py_(X)DECREC_REPLACE.
> 4. Py_REF_ASSIGN (Py_XREF_ASSIGN? Py_REF_XASSIGN?).
> 5. Py_(X)REPLACE.
> 6. Py_(X)STORE
> 7. Py_CLEAR_AND_SET.
> 8. Py_SET_AND_(X)DECREF.
> 9. Py_(X)DECREF_AND_ASSIGN.
> 10. Py_ASSIGN_AND_(X)DECREF.
> 11. Other...
>
> Let's choose the least confusing names.
>
> See discussions at:
>
> http://bugs.python.org/issue3081
> http://bugs.python.org/issue16447
> http://bugs.python.org/issue20440
> http://comments.gmane.org/gmane.comp.python.devel/145346
>
> ___
> Python-Dev mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/
> rymg19%40gmail.com
>



-- 
Ryan
If anybody ever asks me why I prefer C++ to C, my answer will be simple:
"It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was
nul-terminated."
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] GSoC 2014 - Email Module

2014-02-26 Thread Paul Moore
On 26 February 2014 16:13, Brett Cannon  wrote:
>>>
>>> Please sign up for core-mentorship list and ask questions there.
>>
>>
>> Is this for students too? Because I want to join as a student.
>
>
> The mailing list is for anyone who wants to contribute to Python's
> development and wants some help getting started, student or not.

The subject of this email mentions GSoC, it's probably worth
clarifying that the GSoC process is still under way and there isn't
(as far as I know, I'm not involved myself) a confirmed list of
mentors and projects in place yet. The OP is more than welcome to get
involved, and the core-mentorship list will provide help in getting up
to speed and starting to contribute, but it's not directly related to
GSoC. Becoming part of the development community is a great way to
prepare for a GSoC project when that starts up, though!

Paul
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Poll: Py_REPLACE/Py_ASSIGN/etc

2014-02-26 Thread Antoine Pitrou
On Wed, 26 Feb 2014 11:40:01 +0200
Serhiy Storchaka  wrote:

> There were several suggestions for naming new macros which replace old 
> value with new value and then (x)decref old value.
> 
> #define Py_XXX(ptr, value)\
>  { \
>  PyObject *__tmp__ = ptr;  \
>  ptr = new_value;  \
>  Py_DECREF(__tmp__);   \
>  }


> 1. Py_(X)SETREF.

My vote is on this one.
I'm also -1 on any name which doesn't have "REF" in it; the name should
clearly suggest that it's a refcounting operation.

Regards

Antoine.


___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] GSoC 2014 - Status for Core Python

2014-02-26 Thread Terry Reedy

On 2/26/2014 12:34 PM, Paul Moore wrote:


The subject of this email mentions GSoC, it's probably worth
clarifying that the GSoC process is still under way and there isn't
(as far as I know, I'm not involved myself) a confirmed list of
mentors and projects in place yet.


There is a confirmed list of 190 sponsor organizations, including PSF.
https://www.google-melange.com/gsoc/org/list/public/google/gsoc2014
50 include 'python' in their tags.

PSF acts as an umbrella organization for multiple Python projects
https://wiki.python.org/moin/SummerOfCode/2014
Core Python is the first listed of about 15.

core-mentorship is listed as the list for core Python GSOC projects. The 
core Python ideas page is

https://wiki.python.org/moin/SummerOfCode/2014/python-core
Email (R. David Murray, Antoine Pitrou) and Idle (me, Tal Einat) are the 
two project areas lists.


According to the GSOC timeline
https://www.google-melange.com/gsoc/events/google/gsoc2014
this is an 'Interim Period' and 'Would-be students discuss project ideas 
with potential mentoring organizations.'



The OP is more than welcome to get
involved, and the core-mentorship list will provide help in getting up
to speed and starting to contribute, but it's not directly related to
GSoC. Becoming part of the development community is a great way to
prepare for a GSoC project when that starts up, though!


Our intention is that GSOC students be a part of the core development 
community in that their code should be posted and reviewed on the 
tracker and hopefully committed, just as with any other new developer on 
the list.


--
Terry Jan Reedy

___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] GSoC 2014 - Status for Core Python

2014-02-26 Thread Paul Moore
On 26 February 2014 18:53, Terry Reedy  wrote:
> On 2/26/2014 12:34 PM, Paul Moore wrote:
>
>> The subject of this email mentions GSoC, it's probably worth
>> clarifying that the GSoC process is still under way and there isn't
>> (as far as I know, I'm not involved myself) a confirmed list of
>> mentors and projects in place yet.
>
>
> There is a confirmed list of 190 sponsor organizations, including PSF.
> https://www.google-melange.com/gsoc/org/list/public/google/gsoc2014
> 50 include 'python' in their tags.
>
> PSF acts as an umbrella organization for multiple Python projects
> https://wiki.python.org/moin/SummerOfCode/2014
> Core Python is the first listed of about 15.

[...]

That's fantastic. My apologies for spreading misinformation, I was
going off the last things I remembered seeing on this list, which is
not what I should have done. I should have checked my facts before
posting.

Paul
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] GSoC 2014 - Status for Core Python

2014-02-26 Thread Tim Delaney
On 27 February 2014 05:53, Terry Reedy  wrote:

>
> PSF acts as an umbrella organization for multiple Python projects
> https://wiki.python.org/moin/SummerOfCode/2014
> Core Python is the first listed of about 15.
>

I'm guessing Mercurial will appear under the umbrella in the not to distant
future (Mercurial was rejected as a sponsor organisation - Giovanni
Gherdovich is liaising with the PSF about it).

Tim Delaney
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Poll: Py_REPLACE/Py_ASSIGN/etc

2014-02-26 Thread Nick Coghlan
On 27 Feb 2014 04:28, "Antoine Pitrou"  wrote:
>
> On Wed, 26 Feb 2014 11:40:01 +0200
> Serhiy Storchaka  wrote:
>
> > There were several suggestions for naming new macros which replace old
> > value with new value and then (x)decref old value.
> >
> > #define Py_XXX(ptr, value)\
> >  { \
> >  PyObject *__tmp__ = ptr;  \
> >  ptr = new_value;  \
> >  Py_DECREF(__tmp__);   \
> >  }
>
>
> > 1. Py_(X)SETREF.
>
> My vote is on this one.
> I'm also -1 on any name which doesn't have "REF" in it; the name should
> clearly suggest that it's a refcounting operation.

Yeah, I think SETREF is my favourite as well (even though some of the later
suggestions were mine).

Cheers,
Nick.

>
> Regards
>
> Antoine.
>
>
> ___
> Python-Dev mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] GSoC 2014 - Status for Core Python

2014-02-26 Thread Nick Coghlan
On 27 Feb 2014 08:07, "Tim Delaney"  wrote:
>
> On 27 February 2014 05:53, Terry Reedy  wrote:
>>
>>
>> PSF acts as an umbrella organization for multiple Python projects
>> https://wiki.python.org/moin/SummerOfCode/2014
>> Core Python is the first listed of about 15.
>
>
> I'm guessing Mercurial will appear under the umbrella in the not to
distant future (Mercurial was rejected as a sponsor organisation - Giovanni
Gherdovich is liaising with the PSF about it).

I saw a comment from Matt Mackall about that earlier, so it sounds like
it's happening: https://twitter.com/mpmselenic/status/438793983251083264

Cheers,
Nick.

>
> Tim Delaney
>
> ___
> Python-Dev mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com
>
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Poll: Py_REPLACE/Py_ASSIGN/etc

2014-02-26 Thread Georg Brandl
Am 26.02.2014 17:09, schrieb Ryan Gonzalez:
> I like Py_DECREF_REPLACE. It gives the impression that it decrefs the original
> and replaces it.

Agreed, most other suggestions are not really explicit enough.

Georg

___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com