[Chicago] History of programming
Jason Wirth
wirth.jason at gmail.com
Wed May 27 15:11:53 CEST 2015
Kirby that notion if eater is an interesting metaphor i haven't year heard
to explain the concept.
I'm fascinated by how the words we use highlight or hide certain aspects of
the concepts we seek to explain.
Likewise, language and metaphor play a huge role in teaching and learning.
How many times have idea been circularly explained? Eg
"A callable is something that can be called." Haha.
PS you are in Portland? I suspect your couch, guest bedrooms, and all
available floor space will be full in about 10 months from now. :)
On Wed, May 27, 2015 at 12:17 AM kirby urner <kirby.urner at gmail.com> wrote:
>
>> Python has a clear notion of "callable" as "those objects which eat" i.e.
>> "have a mouth" (how I start with beginners sometimes).
>>
>> Our callables aren't just functions, but types as well. In Python 3.x,
>> range() and enumerate() are type calls, not function calls.
>>
>
> Of course a function is just another type e.g. FunctionType or <class
> 'function'>.
>
> So in another sense callables are all types as everything is an object and
> all objects have type.
>
> Just next( ) and iter( ) are more the builtin functions whereas we also
> have a more general type object of type type.
>
> >>> type (int)
> <class 'type'>
> >>> type (str)
> <class 'type'>
> >>> def F(): pass
> >>> type(F)
> <class 'function'>
>
> (using 3.4)
>
> Kirby
>
>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> https://mail.python.org/mailman/listinfo/chicago
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20150527/97bd7cd1/attachment.html>
More information about the Chicago
mailing list