[Tutor] Critiquing a function exercise from dabeaz (Was: Type annotation errors)
DL Neil
PyTutor at danceswithmice.info
Sat Jun 6 22:45:24 EDT 2020
On 6/06/20 1:40 PM, boB Stepp wrote:
> DL Neil wrote:
>> boB wrote:
>>> Peter wrote:
>>> In terms of following along with Beazley's course material this would be
>>> cheating. Classes have not been presented yet. Even very simple ones.
>>> ~(:>))
>>>
>>>> PPS: For someone who knows a little C the obvious fix for your
>>>> version is to
>>>> cast the union to the expected type:
>
>> This is a little difficult to rationalise:
>> - we are not trying to get ahead of the course material
>> - but we are prepared to launch into complex (if not complicated) mypy
>> Apologies, I can see the 'why' but can't help but feel it is only that
>> imbalance which has led to the problem...
>
> HALT! *I* am solely responsible for mixing in type annotations, not Mr.
> Beazley. As you know I have been working on learning these. While I am
> working through his course I am practicing type annotations. Beazley does
> briefly mention type annotations, but so far he has not asked the reader of
> his course to do anything with them. Any resulting messy annotations are
> the sole responsibility of daboB (*not* dabeaz).
Understood, and that's the point: having accepted the assignment's
status as 'incomplete' (and without typing), it has then had advanced
typing techniques applied. There lies the imbalance.
Further, adding class technology to the assignment was described as
"cheating" - because it is a future topic (one expects). Yet advanced
typing, also not/yet to be covered in the course, is not "cheating"?
Given that 'the other David' has been a trainer almost as long as I (but
he as a Python trainer - which I am (formally) not!), it seemed
reasonable teaching technique/planning that the course would build
further (per more-recent messages to this list). Perhaps the assertion
of it being a useful utility back-then, was somewhat premature, and
better applied to its 'final' iteration of development?
--
Regards =dn
More information about the Tutor
mailing list