Show More
@@ -0,0 +1,6 b'' | |||
|
1 | * :class:`IPython.core.inputsplitter.IPythonInputSplitter` no longer has a method | |
|
2 | ``source_raw_reset()``, but gains :meth:`~IPython.core.inputsplitter.IPythonInputSplitter.raw_reset` | |
|
3 | instead. Use of ``source_raw_reset`` can be replaced with:: | |
|
4 | ||
|
5 | raw = isp.source_raw | |
|
6 | transformed = isp.source_reset() |
@@ -0,0 +1,4 b'' | |||
|
1 | * Input transformers (see :doc:`/config/inputtransforms`) may now raise | |
|
2 | :exc:`SyntaxError` if they determine that input is invalid. The input | |
|
3 | transformation machinery in IPython will handle displaying the exception to | |
|
4 | the user and resetting state. |
@@ -43,6 +43,14 b' to tell when a block of input is complete, and' | |||
|
43 | 43 | to transform complete cells. If you add a transformer, you should make sure that |
|
44 | 44 | it gets added to both. |
|
45 | 45 | |
|
46 | These transformers may raise :exc:`SyntaxError` if the input code is invalid, but | |
|
47 | in most cases it is clearer to pass unrecognised code through unmodified and let | |
|
48 | Python's own parser decide whether it is valid. | |
|
49 | ||
|
50 | .. versionchanged:: 2.0 | |
|
51 | ||
|
52 | Added the option to raise :exc:`SyntaxError`. | |
|
53 | ||
|
46 | 54 | Stateless transformations |
|
47 | 55 | ------------------------- |
|
48 | 56 |
General Comments 0
You need to be logged in to leave comments.
Login now