[Tutor] How to extract numerator and denominator from fractions.Fraction(4, 32)?

wolfrage8765 at gmail.com wolfrage8765 at gmail.com
Tue Aug 6 21:04:39 CEST 2013


<SNIP>
> It all seems a bit like too much magic going on for most beginners to
> understand. And while it's true they don't have to use it, it's easy for
> beginners to hit that kind of thing by accident, have their code "work" (no
> errors) but actually do something very different to what they expect. Now,
> in this case they have to call send(), which in itself is not an intuitive
> thing to do accidentally but I shudder to think how I would explain all that
> to a newbie who did stumble upon it! (Maybe by cut n' pasting code from a
> forum/thread somewhere?)
I have to agree, at some point I thought I was getting to know Python
pretty well, then I read about iterators, and realized I understood
zero of what I had read about iterators.  Since I have unfortunately
avoided them, until I have time to really learn how they work.  It
sounds very cool and all, async type operations like threading with
out threads, but the magical syntax completely alludes me.  And it is
definitely above and beyond an average users level.  But I think that
is because it has it's root in functional programming which as I had
stated before is a complex subject on it's own.
<SNIP>


More information about the Tutor mailing list