Arithmetic sequences in Python

Steven D'Aprano steve at REMOVETHIScyber.com.au
Mon Jan 23 05:43:16 EST 2006


On Sun, 22 Jan 2006 16:40:48 -0800, Paul Rubin wrote:

> Steve Holden <steve at holdenweb.com> writes:
>> > The current list function is supposed to be something like a
>> > typecast:
>> >
>> list() isn't a function, it's a type.
> 
> I'm not sure what the distinction is supposed to be.  "list" is anyway
> callable, and lambda a:list(a) is certainly a function. 


class Parrot:
    def __init__(self):
        pass

Parrot is callable. Is it a function?


Types are types, classes are classes, functions are functions.

Admittedly I still confused between the various flavours of functions
(function, bound method, unbound method, class method, static method...)
*wink* but the difference between types and functions is fairly clear.

Just don't ask about the difference between type and class... *wink*



-- 
Steven.




More information about the Python-list mailing list