Pablo Galindo
a77aac4fca
bpo-43914: Highlight invalid ranges in SyntaxErrors ( #25525 )
...
To improve the user experience understanding what part of the error messages associated with SyntaxErrors is wrong, we can highlight the whole error range and not only place the caret at the first character. In this way:
>>> foo(x, z for z in range(10), t, w)
File "<stdin>", line 1
foo(x, z for z in range(10), t, w)
^
SyntaxError: Generator expression must be parenthesized
becomes
>>> foo(x, z for z in range(10), t, w)
File "<stdin>", line 1
foo(x, z for z in range(10), t, w)
^^^^^^^^^^^^^^^^^^^^
SyntaxError: Generator expression must be parenthesized
2021-04-23 14:27:05 +01:00
..
2020-12-18 09:26:04 -08:00
2021-03-13 19:15:44 -08:00
2021-03-29 19:22:13 +02:00
2021-04-04 09:01:23 +09:00
2021-04-23 14:02:41 +02:00
2021-03-30 17:37:37 +09:00
2020-10-14 17:43:31 +02:00
2021-04-23 14:02:41 +02:00
2021-02-01 21:32:50 +01:00
2021-04-23 12:19:08 +02:00
2021-04-22 21:21:53 -04:00
2021-04-21 12:41:19 +01:00
2021-04-16 11:27:00 +02:00
2021-04-13 18:17:03 +09:00
2021-04-16 19:42:34 +02:00
2021-04-05 17:39:49 +01:00
2021-04-15 00:09:11 +03:00
2021-04-23 14:27:05 +01:00
2021-04-21 10:20:44 -07:00
2021-04-05 13:19:13 -04:00
2021-04-09 20:45:50 -07:00
2021-04-11 06:26:09 -07:00
2020-07-28 09:41:57 +01:00
2021-03-31 00:11:29 +03:00
2021-03-29 22:39:31 +09:00
2020-06-23 10:21:26 -04:00
2021-03-22 09:32:11 +01:00
2020-12-23 20:33:48 -08:00
2020-07-16 09:13:05 +03:00
2021-04-04 17:01:10 +09:00
2021-04-22 08:34:57 -07:00
2021-04-14 03:24:33 +02:00
2021-04-06 11:18:41 +09:00
2021-03-03 08:58:57 -08:00
2020-04-13 21:54:40 -07:00
2020-10-06 10:40:50 -07:00
2020-04-14 12:49:11 -07:00
2020-12-23 09:40:56 -08:00
2021-04-21 10:20:44 -07:00
2020-11-22 10:28:34 +02:00
2020-12-31 11:44:46 +02:00
2021-04-02 09:15:21 -07:00
2020-11-01 01:08:48 -08:00
2020-10-19 22:04:01 -07:00
2021-04-13 13:51:49 +09:00
2020-06-02 13:33:09 +02:00
2021-02-14 14:41:57 -08:00
2021-01-06 04:14:42 +02:00
2021-02-13 01:49:18 -05:00
2020-11-28 02:11:19 -05:00
2021-04-02 09:01:57 +09:00
2021-03-29 12:28:14 +09:00
2020-11-17 15:18:05 -08:00
2020-05-28 10:33:45 +03:00
2020-10-24 21:14:23 +03:00
2021-01-20 09:56:21 +01:00
2021-04-21 12:41:19 +01:00
2021-02-03 13:25:28 -08:00
2020-04-29 22:42:45 -05:00
2021-04-01 16:00:31 +01:00
2021-03-02 11:06:20 -06:00
2021-04-21 10:20:44 -07:00
2020-11-23 18:29:37 +02:00
2021-04-14 14:12:58 +09:00
2020-12-18 20:10:20 +01:00
2021-03-21 21:30:55 -05:00
2021-03-15 11:39:31 -07:00
2020-06-28 15:40:54 +09:00
2020-05-14 03:22:30 +02:00
2021-04-21 23:42:55 +01:00
2020-10-12 07:33:34 -07:00
2021-04-13 13:51:49 +09:00
2021-04-19 07:27:10 +02:00
2020-09-27 01:47:25 +01:00
2021-03-27 06:55:03 -07:00
2020-06-02 03:17:45 +02:00
2020-06-20 11:10:31 +03:00
2021-04-03 15:31:15 -07:00
2021-04-21 12:41:19 +01:00
2021-04-14 03:24:33 +02:00
2020-08-11 06:26:59 -07:00
2021-02-26 14:51:55 -08:00
2020-11-06 18:45:56 -08:00
2021-04-12 14:17:40 +02:00
2021-04-13 13:51:49 +09:00
2020-04-14 16:14:15 -07:00
2021-03-20 16:06:27 -07:00
2020-04-30 11:26:33 +02:00
2020-05-16 19:31:54 +09:00
2021-04-09 22:28:15 +01:00
2020-10-07 16:43:44 -07:00
2021-04-06 11:48:59 +01:00
2021-04-04 09:01:23 +09:00
2021-04-22 21:04:44 +01:00
2021-04-01 08:25:59 -07:00
2020-11-29 10:23:15 -08:00
2021-04-03 15:31:15 -07:00
2021-04-22 17:43:37 +01:00
2021-03-30 21:17:26 -07:00
2020-12-17 20:22:29 +01:00
2021-04-13 19:59:24 -04:00
2021-01-20 09:56:21 +01:00
2021-04-21 10:20:44 -07:00
2020-07-25 22:58:45 +03:00
2021-04-16 11:26:06 +02:00
2021-03-29 14:40:40 +02:00
2020-04-10 07:46:36 -07:00
2021-04-19 20:29:48 -07:00
2021-04-21 10:20:44 -07:00
2020-06-30 22:48:15 +09:00
2021-03-23 19:22:57 +01:00
2020-10-19 10:33:43 +03:00
2020-04-17 19:05:35 +02:00
2020-07-22 20:13:37 -07:00
2020-10-29 02:44:35 -07:00
2021-03-23 17:42:51 +01:00
2021-03-29 12:28:14 +09:00
2020-11-22 10:28:34 +02:00
2021-03-12 15:25:49 -08:00
2020-06-20 11:10:31 +03:00
2020-11-22 10:28:34 +02:00
2020-12-31 20:19:30 +00:00
2021-04-21 10:20:44 -07:00
2021-02-07 16:44:42 -08:00
2021-03-29 12:28:14 +09:00
2020-10-03 20:45:55 +01:00
2021-04-23 14:02:41 +02:00
2020-12-12 13:26:44 -08:00
2021-03-29 12:28:14 +09:00
2020-10-18 20:01:15 +03:00
2021-04-12 10:42:53 +02:00
2020-09-22 16:16:46 +03:00
2021-04-15 21:38:45 +01:00
2021-01-24 12:23:17 +03:00
2021-02-01 21:16:38 +05:30
2021-02-23 09:43:04 -08:00
2020-12-16 22:38:32 +01:00
2020-09-07 18:55:22 +03:00
2021-01-25 14:26:19 -08:00
2021-04-21 12:41:19 +01:00
2021-04-21 10:20:44 -07:00
2020-11-08 10:46:55 +01:00
2020-12-15 18:12:54 -08:00
2021-04-06 08:56:57 -07:00