Scope
Peter Dembinski
pdemb at gazeta.pl
Sun Jun 5 06:40:44 EDT 2005
Steven Bethard <steven.bethard at gmail.com> writes:
> Peter Dembinski wrote:
>> AFAIK inc is builtin function. And builtin functions doesn't have
>> to be real functions, they can be just aliases to Python's VM
>> bytecodes or sets of bytecodes.
>
> Wrong on both counts. ;)
Yup. My mistake.
[snap]
> And while builtin functions may not have to be real *functions*,
> they do have to be real *callables*:
Yes. I discovered it yesterday.
[snap]
> Note that both <type 'builtin_function_or_method'> and <type 'type'>
> have a __call__ method, which means they are callable objects.
> They're not just bytecodes; they're real objects, just like
> everything else in Python. =)
Yup. True.
--
http://www.peter.dembinski.prv.pl
More information about the Python-list
mailing list