• Victor Stinner's avatar
    compiler now ignores constant statements · a2724095
    Victor Stinner yazdı
    The compile ignores constant statements and emit a SyntaxWarning warning.
    
    Don't emit the warning for string statement because triple quoted string is a
    common syntax for multiline comments.
    
    Don't emit the warning on ellipis neither: 'def f(): ...' is a legit syntax for
    abstract functions.
    
    Changes:
    
    * test_ast: ignore SyntaxWarning when compiling test statements. Modify
      test_load_const() to use assignment expressions rather than constant
      expression.
    * test_code: add more kinds of constant statements, ignore SyntaxWarning when
      testing that the compiler removes constant statements.
    * test_grammar: ignore SyntaxWarning on the statement "1"
    a2724095
Adı
Son kayıt (commit)
Son güncelleme
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Programs Loading commit data...
Python Loading commit data...
Tools Loading commit data...
.bzrignore Loading commit data...
.gitignore Loading commit data...
.hgeol Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
.hgtouch Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
aclocal.m4 Loading commit data...
config.guess Loading commit data...
config.sub Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...