From ad18fbf44a9d189e80c97a8008bfde16e98e6ae4 2021-06-17 19:00:04 From: André A. Gomes Date: 2021-06-17 19:00:04 Subject: [PATCH] Fix erroneous code snippets. --- diff --git a/docs/source/interactive/python-ipython-diff.rst b/docs/source/interactive/python-ipython-diff.rst index 8599757..596c578 100644 --- a/docs/source/interactive/python-ipython-diff.rst +++ b/docs/source/interactive/python-ipython-diff.rst @@ -46,9 +46,9 @@ All the following constructs are valid IPython syntax: .. code-block:: ipython In [1]: my_files = !ls ~/ - In [1]: for i,file in enumerate(my_file): + In [1]: for i, file in enumerate(my_files): ...: raw = !echo $file - ...: !echo {files[0].upper()} $raw + ...: !echo {file[0].upper()} $raw .. code-block:: ipython @@ -193,10 +193,9 @@ You can combine the different possibilities in for loops, conditions, functions. .. code-block:: ipython my_files = !ls ~/ - b = "backup file" - for i,file in enumerate(my_file): + for i, file in enumerate(my_files): raw = !echo $backup $file - !cp $file {file.split('.')[0]+'.bak'} + !cp $file {file.split('.')[0] + '.bak'} Magics