File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -840,7 +840,10 @@ parsestr(s)
840840 char * p ;
841841 char * end ;
842842 int c ;
843- int quote = * s ;
843+ int first = * s ;
844+ int quote = first ;
845+ if (isalpha (quote ) || quote == '_' )
846+ quote = * ++ s ;
844847 if (quote != '\'' && quote != '\"' ) {
845848 err_badcall ();
846849 return NULL ;
@@ -859,7 +862,7 @@ parsestr(s)
859862 return NULL ;
860863 }
861864 }
862- if (strchr (s , '\\' ) == NULL )
865+ if (first != quote || strchr (s , '\\' ) == NULL )
863866 return newsizedstringobject (s , len );
864867 v = newsizedstringobject ((char * )NULL , len );
865868 p = buf = getstringvalue (v );
@@ -1903,7 +1906,7 @@ com_expr_stmt(c, n)
19031906{
19041907 REQ (n , expr_stmt ); /* testlist ('=' testlist)* */
19051908 /* Forget it if we have just a doc string here */
1906- if (NCH (n ) == 1 && get_rawdocstring (n ) != NULL )
1909+ if (! c -> c_interactive && NCH (n ) == 1 && get_rawdocstring (n ) != NULL )
19071910 return ;
19081911 com_node (c , CHILD (n , NCH (n )- 1 ));
19091912 if (NCH (n ) == 1 ) {
You can’t perform that action at this time.
0 commit comments