Hotfix/calc refactor - #832
Conversation
There was a problem hiding this comment.
If it were me, I would have just moved calc.py to calc/__init__.py. I think @nedbat would disagree, though.
There was a problem hiding this comment.
Yes, this was my suggestion. As a compromise, I'd add a comment here explaining why: "Ideally, we wouldn't need to pull all the calc symbols up here, but courses were using 'import calc', so this is here to keep them working."
|
I'd also move |
|
Good point about calcfunctions -> functions. |
|
👍 tested on my sandboxed dev machine. |
There was a problem hiding this comment.
I tend to prefer full imports: import calc.functions, just for clarity
There was a problem hiding this comment.
Adding this seems to add some sort of circular import error. If I am a course author, and I run
'import' calc, it invokes 'from calc import *' which calls import 'calc.functions'.
Or: 'import calc.functions' -> 'from calc import *' -> 'import calc.functions'
There was a problem hiding this comment.
Oh. Hrm. Ok, let's just leave it like this for now, then.
There was a problem hiding this comment.
I'll rebase, and then good to go?
|
👍 |
fixes issues we've had with sandboxing on prod and edge by restructuring the calc package.
@nedbat
@cpennington