Message379289
inspect.getsource ignore comments at the end of the function: for example this function: def matmul_single(A, x, out): from numpy import matmul out[:] = matmul(A, x) # Some comment here... using the inspect library: >>> inspect.getsource(matmul_single) >>> "def omp_matmul_single(A, x, out):\n from numpy import matmul\n out[:] = matmul(A, x)\n" the result does not contain the comments at the end of the function. | |
| Date | User | Action | Args | | 2020-10-22 10:48:44 | noureddine.hamid | set | recipients: + noureddine.hamid | | 2020-10-22 10:48:43 | noureddine.hamid | set | messageid: <1603363723.99.0.873580527867.issue42116@roundup.psfhosted.org> | | 2020-10-22 10:48:43 | noureddine.hamid | link | issue42116 messages | | 2020-10-22 10:48:43 | noureddine.hamid | create | | |