Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
A
astor
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
astor
Commits
22227301
Kaydet (Commit)
22227301
authored
Haz 20, 2015
tarafından
Patrick Maupin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add information about other codegen derivatives
üst
9b94b5a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
README.rst
README.rst
+21
-1
No files found.
README.rst
Dosyayı görüntüle @
22227301
...
@@ -15,7 +15,7 @@ astor is designed to allow easy manipulation of Python source via the AST.
...
@@ -15,7 +15,7 @@ astor is designed to allow easy manipulation of Python source via the AST.
There are some other similar libraries, but astor focuses on the following areas:
There are some other similar libraries, but astor focuses on the following areas:
- Round-trip an AST back to Python:
- Round-trip an AST back to Python
[1]_
:
- Modified AST doesn't need linenumbers, ctx, etc. or otherwise
- Modified AST doesn't need linenumbers, ctx, etc. or otherwise
be directly compileable for the round-trip to work.
be directly compileable for the round-trip to work.
...
@@ -43,3 +43,23 @@ There are some other similar libraries, but astor focuses on the following areas
...
@@ -43,3 +43,23 @@ There are some other similar libraries, but astor focuses on the following areas
- Write functions to access the tree based on object names and/or attribute names
- Write functions to access the tree based on object names and/or attribute names
- Enjoy easy access to parent node(s) for tree rewriting
- Enjoy easy access to parent node(s) for tree rewriting
.. [1]
The decompilation back to Python is based on code originally written
by Armin Ronacher. Armin's code was well-structured, but failed on
some obscure corner cases of the Python language (and even more corner
cases when the AST changed on different versions of Python), and its
output arguably had cosmetic issues -- for example, it produced
parentheses even in some cases where they were not needed, to
avoid having to reason about precedence.
Other derivatives of Armin's code are floating around, and typically
have fixes for a few corner cases that happened to be noticed by the
maintainers, but most of them have not been tested as thoroughly as
astor. One exception may be the version of codegen
`maintained at github by CensoredUsername`__. This has been tested
to work properly on Python 2.7 using astor's test suite, and, as it
is a single source file, it may be easier to drop into some applications
that do not require astor's other features or Python 3.x compatibility.
__ https://github.com/CensoredUsername/codegen
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