Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c6486fcd
Commit
c6486fcd
authored
Nov 23, 2007
by
Christian Heimes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Applied patch #1754273 and #1754271 from Thomas Glee
The patches are adding deprecation warnings for back ticks and <>
parent
b1abb954
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
Parser/tokenizer.c
Parser/tokenizer.c
+10
-1
Python/ast.c
Python/ast.c
+4
-0
No files found.
Parser/tokenizer.c
View file @
c6486fcd
...
...
@@ -16,6 +16,7 @@
#include "fileobject.h"
#include "codecs.h"
#include "abstract.h"
#include "pydebug.h"
#endif
/* PGEN */
extern
char
*
PyOS_Readline
(
FILE
*
,
FILE
*
,
char
*
);
...
...
@@ -982,7 +983,15 @@ PyToken_TwoChars(int c1, int c2)
break
;
case
'<'
:
switch
(
c2
)
{
case
'>'
:
return
NOTEQUAL
;
case
'>'
:
{
#ifndef PGEN
if
(
Py_Py3kWarningFlag
)
PyErr_WarnEx
(
PyExc_DeprecationWarning
,
"<> not supported in 3.x"
,
1
);
#endif
return
NOTEQUAL
;
}
case
'='
:
return
LESSEQUAL
;
case
'<'
:
return
LEFTSHIFT
;
}
...
...
Python/ast.c
View file @
c6486fcd
...
...
@@ -1336,6 +1336,10 @@ ast_for_atom(struct compiling *c, const node *n)
return
Dict
(
keys
,
values
,
LINENO
(
n
),
n
->
n_col_offset
,
c
->
c_arena
);
}
case
BACKQUOTE
:
{
/* repr */
if
(
Py_Py3kWarningFlag
&&
PyErr_Warn
(
PyExc_DeprecationWarning
,
"backquote not supported in 3.x"
)
<
0
)
return
NULL
;
expr_ty
expression
=
ast_for_testlist
(
c
,
CHILD
(
n
,
1
));
if
(
!
expression
)
return
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment