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
3daf304f
Kaydet (Commit)
3daf304f
authored
Nis 10, 2006
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Whitespace normalization.
üst
0bc2ab9a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
21 deletions
+21
-21
unparse.py
Demo/parser/unparse.py
+19
-19
Tix.py
Lib/lib-tk/Tix.py
+2
-2
No files found.
Demo/parser/unparse.py
Dosyayı görüntüle @
3daf304f
...
@@ -72,7 +72,7 @@ class Unparser:
...
@@ -72,7 +72,7 @@ class Unparser:
self
.
write
(
a
.
name
)
self
.
write
(
a
.
name
)
if
a
.
asname
:
if
a
.
asname
:
self
.
write
(
" as "
+
a
.
asname
)
self
.
write
(
" as "
+
a
.
asname
)
def
_ImportFrom
(
self
,
t
):
def
_ImportFrom
(
self
,
t
):
self
.
fill
(
"from "
)
self
.
fill
(
"from "
)
self
.
write
(
t
.
module
)
self
.
write
(
t
.
module
)
...
@@ -105,13 +105,13 @@ class Unparser:
...
@@ -105,13 +105,13 @@ class Unparser:
def
_Pass
(
self
,
t
):
def
_Pass
(
self
,
t
):
self
.
fill
(
"pass"
)
self
.
fill
(
"pass"
)
def
_Break
(
self
,
t
):
def
_Break
(
self
,
t
):
self
.
fill
(
"break"
)
self
.
fill
(
"break"
)
def
_Continue
(
self
,
t
):
def
_Continue
(
self
,
t
):
self
.
fill
(
"continue"
)
self
.
fill
(
"continue"
)
def
_Delete
(
self
,
t
):
def
_Delete
(
self
,
t
):
self
.
fill
(
"del "
)
self
.
fill
(
"del "
)
self
.
dispatch
(
t
.
targets
)
self
.
dispatch
(
t
.
targets
)
...
@@ -122,7 +122,7 @@ class Unparser:
...
@@ -122,7 +122,7 @@ class Unparser:
if
t
.
msg
:
if
t
.
msg
:
self
.
write
(
", "
)
self
.
write
(
", "
)
self
.
dispatch
(
t
.
msg
)
self
.
dispatch
(
t
.
msg
)
def
_Exec
(
self
,
t
):
def
_Exec
(
self
,
t
):
self
.
fill
(
"exec "
)
self
.
fill
(
"exec "
)
self
.
dispatch
(
t
.
body
)
self
.
dispatch
(
t
.
body
)
...
@@ -160,7 +160,7 @@ class Unparser:
...
@@ -160,7 +160,7 @@ class Unparser:
self
.
write
(
" ("
)
self
.
write
(
" ("
)
self
.
dispatch
(
t
.
value
)
self
.
dispatch
(
t
.
value
)
self
.
write
(
")"
)
self
.
write
(
")"
)
def
_Raise
(
self
,
t
):
def
_Raise
(
self
,
t
):
self
.
fill
(
'raise '
)
self
.
fill
(
'raise '
)
if
t
.
type
:
if
t
.
type
:
...
@@ -171,13 +171,13 @@ class Unparser:
...
@@ -171,13 +171,13 @@ class Unparser:
if
t
.
tback
:
if
t
.
tback
:
self
.
write
(
", "
)
self
.
write
(
", "
)
self
.
dispatch
(
t
.
tback
)
self
.
dispatch
(
t
.
tback
)
def
_TryExcept
(
self
,
t
):
def
_TryExcept
(
self
,
t
):
self
.
fill
(
"try"
)
self
.
fill
(
"try"
)
self
.
enter
()
self
.
enter
()
self
.
dispatch
(
t
.
body
)
self
.
dispatch
(
t
.
body
)
self
.
leave
()
self
.
leave
()
for
ex
in
t
.
handlers
:
for
ex
in
t
.
handlers
:
self
.
dispatch
(
ex
)
self
.
dispatch
(
ex
)
if
t
.
orelse
:
if
t
.
orelse
:
...
@@ -207,7 +207,7 @@ class Unparser:
...
@@ -207,7 +207,7 @@ class Unparser:
self
.
enter
()
self
.
enter
()
self
.
dispatch
(
t
.
body
)
self
.
dispatch
(
t
.
body
)
self
.
leave
()
self
.
leave
()
def
_ClassDef
(
self
,
t
):
def
_ClassDef
(
self
,
t
):
self
.
write
(
"
\n
"
)
self
.
write
(
"
\n
"
)
self
.
fill
(
"class "
+
t
.
name
)
self
.
fill
(
"class "
+
t
.
name
)
...
@@ -268,7 +268,7 @@ class Unparser:
...
@@ -268,7 +268,7 @@ class Unparser:
self
.
enter
()
self
.
enter
()
self
.
dispatch
(
t
.
orelse
)
self
.
dispatch
(
t
.
orelse
)
self
.
leave
self
.
leave
def
_With
(
self
,
t
):
def
_With
(
self
,
t
):
self
.
fill
(
"with "
)
self
.
fill
(
"with "
)
self
.
dispatch
(
t
.
context_expr
)
self
.
dispatch
(
t
.
context_expr
)
...
@@ -290,7 +290,7 @@ class Unparser:
...
@@ -290,7 +290,7 @@ class Unparser:
self
.
write
(
"`"
)
self
.
write
(
"`"
)
self
.
dispatch
(
t
.
value
)
self
.
dispatch
(
t
.
value
)
self
.
write
(
"`"
)
self
.
write
(
"`"
)
def
_Num
(
self
,
t
):
def
_Num
(
self
,
t
):
self
.
write
(
repr
(
t
.
n
))
self
.
write
(
repr
(
t
.
n
))
...
@@ -307,14 +307,14 @@ class Unparser:
...
@@ -307,14 +307,14 @@ class Unparser:
for
gen
in
t
.
generators
:
for
gen
in
t
.
generators
:
self
.
dispatch
(
gen
)
self
.
dispatch
(
gen
)
self
.
write
(
"]"
)
self
.
write
(
"]"
)
def
_GeneratorExp
(
self
,
t
):
def
_GeneratorExp
(
self
,
t
):
self
.
write
(
"("
)
self
.
write
(
"("
)
self
.
dispatch
(
t
.
elt
)
self
.
dispatch
(
t
.
elt
)
for
gen
in
t
.
generators
:
for
gen
in
t
.
generators
:
self
.
dispatch
(
gen
)
self
.
dispatch
(
gen
)
self
.
write
(
")"
)
self
.
write
(
")"
)
def
_comprehension
(
self
,
t
):
def
_comprehension
(
self
,
t
):
self
.
write
(
" for "
)
self
.
write
(
" for "
)
self
.
dispatch
(
t
.
target
)
self
.
dispatch
(
t
.
target
)
...
@@ -331,7 +331,7 @@ class Unparser:
...
@@ -331,7 +331,7 @@ class Unparser:
if
t
.
orelse
:
if
t
.
orelse
:
self
.
write
(
" else "
)
self
.
write
(
" else "
)
self
.
dispatch
(
t
.
orelse
)
self
.
dispatch
(
t
.
orelse
)
def
_Dict
(
self
,
t
):
def
_Dict
(
self
,
t
):
self
.
write
(
"{"
)
self
.
write
(
"{"
)
for
k
,
v
in
zip
(
t
.
keys
,
t
.
values
):
for
k
,
v
in
zip
(
t
.
keys
,
t
.
values
):
...
@@ -386,7 +386,7 @@ class Unparser:
...
@@ -386,7 +386,7 @@ class Unparser:
self
.
write
(
"
%
s "
%
self
.
boolops
[
t
.
op
.
__class__
])
self
.
write
(
"
%
s "
%
self
.
boolops
[
t
.
op
.
__class__
])
self
.
dispatch
(
v
)
self
.
dispatch
(
v
)
self
.
write
(
")"
)
self
.
write
(
")"
)
def
_Attribute
(
self
,
t
):
def
_Attribute
(
self
,
t
):
self
.
dispatch
(
t
.
value
)
self
.
dispatch
(
t
.
value
)
self
.
write
(
"."
)
self
.
write
(
"."
)
...
@@ -425,7 +425,7 @@ class Unparser:
...
@@ -425,7 +425,7 @@ class Unparser:
# slice
# slice
def
_Ellipsis
(
self
,
t
):
def
_Ellipsis
(
self
,
t
):
self
.
write
(
"..."
)
self
.
write
(
"..."
)
def
_Index
(
self
,
t
):
def
_Index
(
self
,
t
):
self
.
dispatch
(
t
.
value
)
self
.
dispatch
(
t
.
value
)
...
@@ -444,7 +444,7 @@ class Unparser:
...
@@ -444,7 +444,7 @@ class Unparser:
if
i
!=
0
:
if
i
!=
0
:
self
.
write
(
': '
)
self
.
write
(
': '
)
self
.
dispatch
(
d
)
self
.
dispatch
(
d
)
# others
# others
def
_arguments
(
self
,
t
):
def
_arguments
(
self
,
t
):
first
=
True
first
=
True
...
@@ -472,13 +472,13 @@ class Unparser:
...
@@ -472,13 +472,13 @@ class Unparser:
self
.
write
(
t
.
arg
)
self
.
write
(
t
.
arg
)
self
.
write
(
"="
)
self
.
write
(
"="
)
self
.
dispatch
(
t
.
value
)
self
.
dispatch
(
t
.
value
)
def
_Lambda
(
self
,
t
):
def
_Lambda
(
self
,
t
):
self
.
write
(
"lambda "
)
self
.
write
(
"lambda "
)
self
.
dispatch
(
t
.
args
)
self
.
dispatch
(
t
.
args
)
self
.
write
(
": "
)
self
.
write
(
": "
)
self
.
dispatch
(
t
.
body
)
self
.
dispatch
(
t
.
body
)
def
roundtrip
(
filename
,
output
=
sys
.
stdout
):
def
roundtrip
(
filename
,
output
=
sys
.
stdout
):
source
=
open
(
filename
)
.
read
()
source
=
open
(
filename
)
.
read
()
tree
=
compile
(
source
,
filename
,
"exec"
,
0x400
)
tree
=
compile
(
source
,
filename
,
"exec"
,
0x400
)
...
@@ -511,6 +511,6 @@ def main(args):
...
@@ -511,6 +511,6 @@ def main(args):
else
:
else
:
for
a
in
args
:
for
a
in
args
:
roundtrip
(
a
)
roundtrip
(
a
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
main
(
sys
.
argv
[
1
:])
main
(
sys
.
argv
[
1
:])
Lib/lib-tk/Tix.py
Dosyayı görüntüle @
3daf304f
...
@@ -1791,7 +1791,7 @@ class Grid(TixWidget):
...
@@ -1791,7 +1791,7 @@ class Grid(TixWidget):
# valid specific resources as of Tk 8.4
# valid specific resources as of Tk 8.4
# editdonecmd, editnotifycmd, floatingcols, floatingrows, formatcmd,
# editdonecmd, editnotifycmd, floatingcols, floatingrows, formatcmd,
# highlightbackground, highlightcolor, leftmargin, itemtype, selectmode,
# highlightbackground, highlightcolor, leftmargin, itemtype, selectmode,
# selectunit, topmargin,
# selectunit, topmargin,
def
__init__
(
self
,
master
=
None
,
cnf
=
{},
**
kw
):
def
__init__
(
self
,
master
=
None
,
cnf
=
{},
**
kw
):
static
=
[]
static
=
[]
self
.
cnf
=
cnf
self
.
cnf
=
cnf
...
@@ -1805,7 +1805,7 @@ class Grid(TixWidget):
...
@@ -1805,7 +1805,7 @@ class Grid(TixWidget):
def
anchor_get
(
self
):
def
anchor_get
(
self
):
"Get the (x,y) coordinate of the current anchor cell"
"Get the (x,y) coordinate of the current anchor cell"
return
self
.
_getints
(
self
.
tk
.
call
(
self
,
'anchor'
,
'get'
))
return
self
.
_getints
(
self
.
tk
.
call
(
self
,
'anchor'
,
'get'
))
# def bdtype
# def bdtype
# def delete dim from ?to?
# def delete dim from ?to?
def
delete_row
(
self
,
from_
,
to
=
None
):
def
delete_row
(
self
,
from_
,
to
=
None
):
...
...
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