[Edu-sig] Re: back to school... "1/3" --> float question, just eval?

2020-04-11 Thread Wes Turner
Glad to help! There's so much time to learn during quarantine! Writing tests for myself because I <3 them so much; and because they're the missing half of the code. Like camper_program.py, IPython is a REPL (Read Evaluate Print Loop :) ```bash $ pip install ipython; ipython ``` ```python >>> ? >

[Edu-sig] Re: back to school... "1/3" --> float question, just eval?

2020-04-11 Thread kirby urner
Yikes. My attempt at hand-coding markdown links formatting as [word]( http://address) didn't work well at all in the HyperKitty Mailman3 view, my apologies. Here are the links again, in the order linked... This thread: https://mail.python.org/archives/list/edu-sig@python.org/thread/H6KKJR57V7G4CI

[Edu-sig] Re: back to school... "1/3" --> float question, just eval?

2020-04-11 Thread kirby urner
I decided to try replying through the HyperKitty archived interface, where I’ve been examining the cosmetics of [our thread](https://mail.python.org/archives/list/edu-sig@python.org/thread/H6KKJR57V7G4CIPDPJ7FUCXWDHMRUYUT/

[Edu-sig] Re: back to school... "1/3" --> float question, just eval?

2020-04-10 Thread Wes Turner
Here's the list of cookiecutters: https://cookiecutter.readthedocs.io/en/latest/README.html#a-pantry-full-of-cookiecutters https://github.com/cookiecutter/cookiecutter#a-pantry-full-of-cookiecutters One great thing about starting with a cookiecutter is you don't need to understand how it all works

[Edu-sig] Re: back to school... "1/3" --> float question, just eval?

2020-04-10 Thread Wes Turner
That link to GitHub Learning Lab should be: https://lab.github.com/ - https://lab.github.com/githubtraining/introduction-to-github (57m) - https://lab.github.com/githubtraining/github-actions:-continuous-integration (171m) - https://lab.github.com/githubtraining/continuous-integration-with-travis-c

[Edu-sig] Re: back to school... "1/3" --> float question, just eval?

2020-04-10 Thread Wes Turner
On Fri, Apr 10, 2020 at 4:40 PM kirby urner wrote: > > Thank you very much for the pull requests Wes! I got notification by > email. > > They may be against a version that no longer exists, but no matter. We're > gonna poke around live on camera, starting in about 30 minutes. We go for > 2.25 h

[Edu-sig] Re: back to school... "1/3" --> float question, just eval?

2020-04-10 Thread kirby urner
Thank you very much for the pull requests Wes! I got notification by email. They may be against a version that no longer exists, but no matter. We're gonna poke around live on camera, starting in about 30 minutes. We go for 2.25 hours with one or two breaks. I'm taking my campers right into my

[Edu-sig] Re: back to school... "1/3" --> float question, just eval?

2020-04-09 Thread Wes Turner
Should've re-read your first message before I replied: - "CLN: camper_program.py: Cleanup camper program codestyle with black and pyflakes" https://github.com/4dsolutions/python_camp/pull/3 - "TST: camper_program.py: tests and exception handlin" https://github.com/4dsolutions/python_camp/pull/

[Edu-sig] Re: back to school... "1/3" --> float question, just eval?

2020-04-09 Thread Wes Turner
Are there unit tests for the supported operations? Is the UI logic a separate testable unit? Does it just fatal exception when parsing fails; or does the REPL loop catch the e.g. Value error? Instead of a CLI eval wrapper with regex, you could use ipywidgets in a notebook: https://ipywidgets.readt

[Edu-sig] Re: back to school... "1/3" --> float question, just eval?

2020-04-09 Thread kirby urner
> > > Try the following: > > from fractions import Fraction > float(Fraction("1/3")) > > Knowing you, I'm sure you can figure out plenty of useful applications of > this. :-) > > André > > A totally excellent suggestion! I'm going to share that, by bringing campers here on tour, saying "this is wh

[Edu-sig] Re: back to school... "1/3" --> float question, just eval?

2020-04-09 Thread André Roberge
On Thu, Apr 9, 2020 at 2:02 PM kirby urner wrote: > Here's a thread I'm starting with my campers taking a PyCamp course. > > Yesterday we were co-evolving a calculator driven by looping menu. It > does squares and square roots (one of the campers supplied this logic) and > I was just getting aro