-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use comment syntax instead of jinja templates to denote solution code #4
Comments
But does not the syntax of comment depend on the language ? Also the "jinja" syntax is not specific to jinja it is used in many templating library of many languages : I would say that people that use this are advance user, and that with comment-like templating you risk of reinventing your own thing. Also it is trivial to test wether an notebook with jinja-block is valid, or still contain jinja-block. When it's comment, you can mistype, and create an assigment notebook with solutions, so you have to check all by hand. So please wait cost of comment more. |
The comment approach simplifies things dramatically:
On Tue, Sep 16, 2014 at 1:02 AM, Matthias Bussonnier <
Brian E. Granger |
I was originally in favor of the jinja templates too -- hence why I had them :) -- but after discussing it and thinking about it more I'm fairly convinced that they are overkill, largely for the reasons @ellisonbg stated. Also, although there is less of a risk (because syntax errors will be caught), you do still run the risk of having mistyped jinja templates, like this:
Which would just render an empty string, because |
Ian's and Doug's documentation updates
In the master version, instructors may want to mark some code inline as solution-only, like this:
Previously I did this with jinja, but @ellisonbg and I agreed that using comments is better because then the cells are pure python and can still be run without using nbgrader, and it's a clearer syntax for people who are unfamiliar with jinja.
The text was updated successfully, but these errors were encountered: