[Chicago] History of programming
Randy Baxley
randy7771026 at gmail.com
Wed May 27 16:32:54 CEST 2015
Very, very, nice Kirby. I have not pulled the trigger yet on PyTexas but
10 weeks kind of bumps up against it. What is in ten weeks? Sort of fits
in with the discussion. If we allocate ( Beasley, urner, Cook, Severance
).Pyfoo
On Wed, May 27, 2015 at 8:53 AM, kirby urner <kirby.urner at gmail.com> wrote:
>
>
> On Wed, May 27, 2015 at 6:11 AM, Jason Wirth <wirth.jason at gmail.com>
> wrote:
>
>
> Kirby that notion if eater is an interesting metaphor i haven't year heard
>> to explain the concept.
>>
>
> Yeah, the () after obj() looks like the emoticon mouth. ;-()
>
> So I tell kids a callable "has a mouth" even if arguments are optional.
> () triggers __call__.
>
> That takes me to talking about __ribs__ (my word for special or magic
> names) as Pythons have lots of __ribs__ (mnemonic).
>
> A class definition may have a __rib__ cage as when lots of magic method
> behaviors get defined (__call__ included).
>
> In Python4 (class I teach), we have a Composable class such that even
> though <class 'function'> type objects don't multiply, e.g. h = f * g makes
> no sense, out of the box, we go:
>
> >>> f = Composable(f)
> >>> g = Composable(g)
> >>> h = f * g
>
> and then h(x) == f(g(x)) i.e. to multiply is to compose. For an exercise,
> the students implement __pow__ such that (f ** 5)(x) == f(f(f(f(f(x))))).
>
> Identity function: Composable(lambda x: x) e.g. f ** 0.
>
>
>> 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.
>>
>
> A callable implements __call__ would be better.
>
>
>>
>> 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. :)
>>
>
> 10 weeks you mean right?
>
> Check with me closer to the time. I do have a housemate in Nepal right
> now who needs some R&R before returning in August. When she's away, her
> room is available as a guest room. Also my 86 year old mom lives here in
> summer months.
>
> Lets get together in any case and quaff a cold one or two.
>
> Kirby
>
> PS: I was born in Chicago if that matters (asserting my Chipy
> credentials) -- came to Djangocon in 2013, after which I made a short
> Youtube with more metaphors:
> http://worldgame.blogspot.com/2013/09/leveraging-python.html
>
>
>
>
> _______________________________________________
> 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/c606fcd9/attachment.html>
More information about the Chicago
mailing list