[Edu-sig] a Circle type with radius, area both properties
kirby urner
kirby.urner at gmail.com
Wed Oct 19 17:11:10 EDT 2016
Excellent links, many thank yous.
My query about the @property pattern was special
to the Circle.radius / Circle.area co-variance, not
like I imagined inventing the whole design pattern
of co-variance. Who else does Circle in Python in
9th grade?
Another one I'm close to having is where you have
a Tetrahedron defined by its six edge lengths. You
just get to change those, and it'll raise an exception
if you try something impossible. Others vary in a
specific way if they have to.
What I've got on Github is the edges-to-volume
algorithm already in Python.
In adjusting each edge at a time, as to length,
others accommodating, the computer can figure
out all the coordinates (XYZ, IVM or whatever)
and adjust the volume accordingly.
One more object type among many.
So do we let the math teachers teach this? I bet
some will, whether or not we "let" them, right?
Kirby
On Wed, Oct 19, 2016 at 11:40 AM, Wes Turner <wes.turner at gmail.com> wrote:
> https://en.wikipedia.org/wiki/Observer_pattern
>
> - https://docs.python.org/2/reference/datamodel.html#object.__setattr__
> - https://github.com/ipython/traitlets/#callbacks-when-a-
> trait-attribute-change
> - https://traitlets.readthedocs.io/en/stable/
> using_traitlets.html#observe @observe decorator
>
> https://en.wikipedia.org/wiki/Reactive_programming
>
>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/edu-sig/attachments/20161019/328392ff/attachment.html>
More information about the Edu-sig
mailing list