Terry Reedy wrote:
I believe
that CPython function objects must currently all have the same size or
at least the same max size and conclude that CPython currently allocates
them from a block of memory that is some multiple of that size.
I wouldn't be surprised if there is a free list for func
On 3/15/2019 8:47 AM, Arup Rakshit wrote:
Hi,
I am reading a book where it says that:
Just like module-level function definitions, the definition of a local function
happens at run time when the def keyword is executed. Interestingly, this means
that each call to sort_by_last_letter results i
Nice explanation. Thank you very much.
Thanks,
Arup Rakshit
a...@zeit.io
> On 15-Mar-2019, at 6:24 PM, Calvin Spealman wrote:
>
> This is actually part of a not entirely uncommon misconception that can arise
> by comparing objects only by their
> repr() outputs (the string representatio
This is actually part of a not entirely uncommon misconception that can
arise by comparing objects only by their
repr() outputs (the string representation created when you pass them to
print).
You're comparing the ID or memory address of the objects and determining
they must be the same object. In
Hi,
I am reading a book where it says that:
Just like module-level function definitions, the definition of a local function
happens at run time when the def keyword is executed. Interestingly, this means
that each call to sort_by_last_letter results in a new definition of the
function last_let