Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
feac6248
Kaydet (Commit)
feac6248
authored
Ock 24, 2011
tarafından
Terry Reedy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #11000 ast.parse parses source, not just expressions.
üst
b0270110
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
ast.rst
Doc/library/ast.rst
+2
-2
ast.py
Lib/ast.py
+4
-4
No files found.
Doc/library/ast.rst
Dosyayı görüntüle @
feac6248
...
...
@@ -110,9 +110,9 @@ The abstract grammar is currently defined as follows:
Apart from the node classes, :mod:`ast` module defines these utility functions
and classes for traversing abstract syntax trees:
.. function:: parse(
expr
, filename='<unknown>', mode='exec')
.. function:: parse(
source
, filename='<unknown>', mode='exec')
Parse
an expression into an AST node. Equivalent to ``compile(expr
,
Parse
the source into an AST node. Equivalent to ``compile(source
,
filename, mode, ast.PyCF_ONLY_AST)``.
...
...
Lib/ast.py
Dosyayı görüntüle @
feac6248
...
...
@@ -28,12 +28,12 @@ from _ast import *
from
_ast
import
__version__
def
parse
(
expr
,
filename
=
'<unknown>'
,
mode
=
'exec'
):
def
parse
(
source
,
filename
=
'<unknown>'
,
mode
=
'exec'
):
"""
Parse
an expression
into an AST node.
Equivalent to compile(
expr
, filename, mode, PyCF_ONLY_AST).
Parse
the source
into an AST node.
Equivalent to compile(
source
, filename, mode, PyCF_ONLY_AST).
"""
return
compile
(
expr
,
filename
,
mode
,
PyCF_ONLY_AST
)
return
compile
(
source
,
filename
,
mode
,
PyCF_ONLY_AST
)
def
literal_eval
(
node_or_string
):
...
...
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