##// END OF EJS Templates
# This is a combination of 2 commits....
Matthias Bussonnier -
Show More
@@ -40,7 +40,22 b' class NBFormatError(ValueError):'
40 pass
40 pass
41
41
42 # no-conversion singleton
42 # no-conversion singleton
43 NO_CONVERT = object()
43 class Sentinel(object):
44
45 def __init__(self, name, module, docstring=None):
46 self.name = name
47 self.module = module
48 if docstring:
49 self.__doc__ = docstring
50
51
52 def __repr__(self):
53 return str(self.module)+'.'+self.name
54
55 NO_CONVERT = Sentinel('NO_CONVERT', __name__,
56 """Value to prevent nbformat to convert notebooks to most recent version.
57 """)
58
44
59
45 def reads(s, as_version, **kwargs):
60 def reads(s, as_version, **kwargs):
46 """Read a notebook from a string and return the NotebookNode object as the given version.
61 """Read a notebook from a string and return the NotebookNode object as the given version.
General Comments 0
You need to be logged in to leave comments. Login now