On Mon, Mar 21, 2016 at 5:56 PM, Tim Peters wrote:
> I've seen this trigger,
> from C code that had no idea it was playing with None, but just had
> general refcounting errors. So this does serve a debugging purpose,
> although rarely
>
You probably have a better refcounting sense that I do, bu
Brett Cannon ]
>> And if we didn't keep its count accurately it would eventually hit
>> zero and constantly have its dealloc function checked for.
[Armin Rigo]
[> I think the idea is really consistency. If we wanted to avoid all
> "Py_INCREF(Py_None);", it would be possible: we could let the refc
Hi,
On 20 March 2016 at 18:10, Brett Cannon wrote:
> And if we didn't keep its count accurately it would eventually hit
> zero and constantly have its dealloc function checked for.
I think the idea is really consistency. If we wanted to avoid all
"Py_INCREF(Py_None);", it would be possible: we
[Facundo Batista ]
> I'm seeing that our code increases the reference counting to Py_None,
> and I find this a little strange: isn't Py_None eternal and will never
> die?
Yes, but it's immortal in CPython because its reference count never
falls to 0 (it's created with a reference count of 1 to beg
On Sun, 20 Mar 2016 at 09:44 Facundo Batista
wrote:
> Hello!
>
> I'm seeing that our code increases the reference counting to Py_None,
> and I find this a little strange: isn't Py_None eternal and will never
> die?
>
Semantically yes, but we have to technically make that happen. :)
>
> What's
On Sun, Mar 20, 2016 at 01:43:27PM -0300, Facundo Batista wrote:
> Hello!
>
> I'm seeing that our code increases the reference counting to Py_None,
> and I find this a little strange: isn't Py_None eternal and will never
> die?
>
> What's the point of counting its references?
Avoiding a branch o
Hello!
I'm seeing that our code increases the reference counting to Py_None,
and I find this a little strange: isn't Py_None eternal and will never
die?
What's the point of counting its references?
Thanks!
--
.Facundo
Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar