Eric Snow wrote:
> On Fri, Aug 5, 2011 at 11:29 AM, Steven D'Aprano
> wrote:
[...]
>> Do you believe that this process of generating a code object and throwing
>> it away is a part of the Python language specification, which any
>> compiler must do in order to call itself "Python", or a mere
>> i
Mel wrote:
> Steven D'Aprano wrote:
>
>> There may be some other obscure built-in type that includes code objects,
>> but I can't imagine what it would be. I feel confident in saying that
>> functions, and functions alone, contain code. Even methods are just
>> wrappers around functions. Even bui
On Fri, Aug 5, 2011 at 11:29 AM, Steven D'Aprano
wrote:
> Eric Snow wrote:
>
>> On Fri, Aug 5, 2011 at 8:36 AM, Steven D'Aprano
>> wrote:
>>> Eric Snow wrote:
>>>
In Python, three types of objects have special syntax and mechanics
for their instantiation, during which a code object is g
On 8/5/2011 4:22 AM, Thomas Jollans wrote:
On 05/08/11 09:20, Eric Snow wrote:
Object available during code object execution:
(M) no
(C) no
(F) no
(F) yes.
cf. recursion.
Recursion only happens through runtime name resolution, not through
direct access to the function or code object from wi
Steven D'Aprano wrote:
> There may be some other obscure built-in type that includes code objects,
> but I can't imagine what it would be. I feel confident in saying that
> functions, and functions alone, contain code. Even methods are just
> wrappers around functions. Even built-in functions like
Eric Snow wrote:
> On Fri, Aug 5, 2011 at 8:36 AM, Steven D'Aprano
> wrote:
>> Eric Snow wrote:
>>
>>> In Python, three types of objects have special syntax and mechanics
>>> for their instantiation, during which a code object is generated:
>>> modules, classes, and functions.
>>
>> I believe you
On Fri, Aug 5, 2011 at 8:36 AM, Steven D'Aprano
wrote:
> Eric Snow wrote:
>
>> In Python, three types of objects have special syntax and mechanics
>> for their instantiation, during which a code object is generated:
>> modules, classes, and functions.
>
> I believe you are labouring under a misapp
Chris Angelico wrote:
> On Fri, Aug 5, 2011 at 9:22 AM, Thomas Jollans wrote:
>> On 05/08/11 09:20, Eric Snow wrote:
>>> Object available during code object execution:
>>> (M) no
>>> (C) no
>>> (F) no
>> (F) yes.
>>
>> cf. recursion.
>
> Is it? As I understand it, a Python function is not able t
Eric Snow wrote:
> In Python, three types of objects have special syntax and mechanics
> for their instantiation, during which a code object is generated:
> modules, classes, and functions.
I believe you are labouring under a misapprehension. Modules and classes
don't generate code objects.
Th
On Fri, Aug 5, 2011 at 9:22 AM, Thomas Jollans wrote:
> On 05/08/11 09:20, Eric Snow wrote:
>> Object available during code object execution:
>> (M) no
>> (C) no
>> (F) no
> (F) yes.
>
> cf. recursion.
Is it? As I understand it, a Python function is not able to reference
"itself" but must referen
On 05/08/11 09:20, Eric Snow wrote:
> Object available during code object execution:
> (M) no
> (C) no
> (F) no
(F) yes.
cf. recursion.
--
http://mail.python.org/mailman/listinfo/python-list
In Python, three types of objects have special syntax and mechanics
for their instantiation, during which a code object is generated:
modules, classes, and functions. Each has its own role to play and
the differences between them mostly reflect that. Here are some
observations (based on default b
12 matches
Mail list logo