Re: [Python-Dev] Google Summer of Code

2016-02-07 Thread Stephen J. Turnbull
As long as it's been brought up here: Yes, the PSF is applying. Google has been deliberately stirring things up in the last couple of years, so no promises, but it is very likely that we will be approved and core Python will have at least two slots allocated (although I'm not sure core Python eve

Re: [Python-Dev] When does `PyType_Type.tp_alloc get assigned to PyType_GenericAlloc ?

2016-02-07 Thread eryk sun
On Sun, Feb 7, 2016 at 7:58 AM, Randy Eels wrote: > > Yet, I can't seem to understand where and when does the `tp_alloc` slot of > PyType_Type get re-assigned to PyType_GenericAlloc. Does that even happen? > Or am I missing something bigger? _Py_InitializeEx_Private in Python/pylifecycle.c calls

Re: [Python-Dev] When does `PyType_Type.tp_alloc get assigned to PyType_GenericAlloc ?

2016-02-07 Thread Guido van Rossum
I think it's probably line 2649 in typeobject.c, in type_new(): type->tp_alloc = PyType_GenericAlloc; On Sun, Feb 7, 2016 at 5:58 AM, Randy Eels wrote: > Hi everyone, > > I've a question about the implementation of the `type` builtin (in Python > 3.5). > > In Objects/typeobject.c, the `tp_al

Re: [Python-Dev] Google Summer of Code

2016-02-07 Thread Brett Cannon
On Sun, 7 Feb 2016 at 02:14 Victor Stinner wrote: > Hi, > > I would like to propose the FAT Python project subject to the Google > Summer of Code: > https://developers.google.com/open-source/gsoc/ > > I have a long list of optimization ideas for fatoptimizer: > http://fatoptimizer.readthedocs.or

Re: [Python-Dev] PEP 0492 __aenter__ & __aexit__

2016-02-07 Thread Brett Cannon
On Sun, 7 Feb 2016 at 08:17 Daniel Miller wrote: > Awesome, I missed that. Thank you Brett. > Welcome! > > Am I understanding correctly that if I'd like to avoid `async with await > EXPR` whatever is returned from EXPR must implement `__await__` as a > non-coroutine method? Which then I'd just

Re: [Python-Dev] PEP 0492 __aenter__ & __aexit__

2016-02-07 Thread Daniel Miller
Awesome, I missed that. Thank you Brett. Am I understanding correctly that if I'd like to avoid `async with await EXPR` whatever is returned from EXPR must implement `__await__` as a non-coroutine method? Which then I'd just be able to use `async with ...`? 2016-02-06 16:05 GMT-06:00 Brett Cann

[Python-Dev] When does `PyType_Type.tp_alloc get assigned to PyType_GenericAlloc ?

2016-02-07 Thread Randy Eels
Hi everyone, I've a question about the implementation of the `type` builtin (in Python 3.5). In Objects/typeobject.c, the `tp_alloc` slot of PyType_Type gets set to 0. However, I can see (using gdb) that it later gets assigned to `&PyType_GenericAlloc`. I'd argue that this makes sense because, in

[Python-Dev] Google Summer of Code

2016-02-07 Thread Victor Stinner
Hi, I would like to propose the FAT Python project subject to the Google Summer of Code: https://developers.google.com/open-source/gsoc/ I have a long list of optimization ideas for fatoptimizer: http://fatoptimizer.readthedocs.org/en/latest/todo.html The fatoptimizer project is written in pure

Re: [Python-Dev] Modify PyMem_Malloc to use pymalloc for performance

2016-02-07 Thread Stefan Behnel
M.-A. Lemburg schrieb am 04.02.2016 um 13:54: > On 04.02.2016 13:29, Victor Stinner wrote: >> But, why not PyObject_Malloc() & PObject_Free() were not used in the >> first place? > > Good question. I guess developers simply thought of PyObject_Malloc() > being for PyObjects, not arbitrary memory b