I meant to introduce a built-in constant WEEK, that would hold a number (integer) value corresponding to the 'version' of source currently in use. I.e., for a REPL running source week 3:
>>> WEEK
3
This used to be implemented here, before the introduction of the custom eval function sourceEval.
With sourceEval, however, all commands are passed through the sourceEval context instead of the repl_obj context.
A fix will likely involve defining WEEK in sourceCtxt instead of repl_obj.context.
We should also be prepared to rename this to the new naming convention (I think it was chapter?), which may require a string instead of a number.
I meant to introduce a built-in constant
WEEK
, that would hold a number (integer) value corresponding to the 'version' of source currently in use. I.e., for a REPL running source week 3:This used to be implemented here, before the introduction of the custom eval function
sourceEval
.With
sourceEval
, however, all commands are passed through thesourceEval
context instead of therepl_obj
context.A fix will likely involve defining
WEEK
insourceCtxt
instead ofrepl_obj.context
.We should also be prepared to rename this to the new naming convention (I think it was chapter?), which may require a string instead of a number.