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
cbce280d
Kaydet (Commit)
cbce280d
authored
Nis 03, 2006
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Don't abbreviate ABS, use long name ABSOLUTE.
üst
f5af2aac
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
8 deletions
+8
-8
code.h
Include/code.h
+1
-1
compile.h
Include/compile.h
+1
-1
pythonrun.h
Include/pythonrun.h
+1
-1
__future__.py
Lib/__future__.py
+1
-1
compile.c
Python/compile.c
+2
-2
future.c
Python/future.c
+2
-2
No files found.
Include/code.h
Dosyayı görüntüle @
cbce280d
...
...
@@ -45,7 +45,7 @@ typedef struct {
#define CO_GENERATOR_ALLOWED 0x1000
#endif
#define CO_FUTURE_DIVISION 0x2000
#define CO_FUTURE_ABS
IMPORT 0x4000
/* absolute import
by default */
#define CO_FUTURE_ABS
OLUTE_IMPORT 0x4000
/* do absolute imports
by default */
#define CO_FUTURE_WITH_STATEMENT 0x8000
/* This should be defined if a future statement modifies the syntax.
...
...
Include/compile.h
Dosyayı görüntüle @
cbce280d
...
...
@@ -22,7 +22,7 @@ typedef struct {
#define FUTURE_NESTED_SCOPES "nested_scopes"
#define FUTURE_GENERATORS "generators"
#define FUTURE_DIVISION "division"
#define FUTURE_ABSIMPORT "absolute_import"
#define FUTURE_ABS
OLUTE_
IMPORT "absolute_import"
#define FUTURE_WITH_STATEMENT "with_statement"
struct
_mod
;
/* Declare the existence of this type */
...
...
Include/pythonrun.h
Dosyayı görüntüle @
cbce280d
...
...
@@ -7,7 +7,7 @@
extern
"C"
{
#endif
#define PyCF_MASK (CO_FUTURE_DIVISION | CO_FUTURE_ABSIMPORT | \
#define PyCF_MASK (CO_FUTURE_DIVISION | CO_FUTURE_ABS
OLUTE_
IMPORT | \
CO_FUTURE_WITH_STATEMENT)
#define PyCF_MASK_OBSOLETE (CO_NESTED)
#define PyCF_SOURCE_IS_UTF8 0x0100
...
...
Lib/__future__.py
Dosyayı görüntüle @
cbce280d
...
...
@@ -64,7 +64,7 @@ __all__ = ["all_feature_names"] + all_feature_names
CO_NESTED
=
0x0010
# nested_scopes
CO_GENERATOR_ALLOWED
=
0
# generators (obsolete, was 0x1000)
CO_FUTURE_DIVISION
=
0x2000
# division
CO_FUTURE_ABS
IMPORT
=
0x4000
# absolute_impor
t
CO_FUTURE_ABS
OLUTE_IMPORT
=
0x4000
# perform absolute imports by defaul
t
CO_FUTURE_WITH_STATEMENT
=
0x8000
# with statement
class
_Feature
:
...
...
Python/compile.c
Dosyayı görüntüle @
cbce280d
...
...
@@ -2476,7 +2476,7 @@ compiler_import(struct compiler *c, stmt_ty s)
int
r
;
PyObject
*
level
;
if
(
c
->
c_flags
&&
(
c
->
c_flags
->
cf_flags
&
CO_FUTURE_ABSIMPORT
))
if
(
c
->
c_flags
&&
(
c
->
c_flags
->
cf_flags
&
CO_FUTURE_ABS
OLUTE_
IMPORT
))
level
=
PyInt_FromLong
(
0
);
else
level
=
PyInt_FromLong
(
-
1
);
...
...
@@ -2524,7 +2524,7 @@ compiler_from_import(struct compiler *c, stmt_ty s)
return
0
;
if
(
s
->
v
.
ImportFrom
.
level
==
0
&&
c
->
c_flags
&&
!
(
c
->
c_flags
->
cf_flags
&
CO_FUTURE_ABSIMPORT
))
!
(
c
->
c_flags
->
cf_flags
&
CO_FUTURE_ABS
OLUTE_
IMPORT
))
level
=
PyInt_FromLong
(
-
1
);
else
level
=
PyInt_FromLong
(
s
->
v
.
ImportFrom
.
level
);
...
...
Python/future.c
Dosyayı görüntüle @
cbce280d
...
...
@@ -29,8 +29,8 @@ future_check_features(PyFutureFeatures *ff, stmt_ty s, const char *filename)
continue
;
}
else
if
(
strcmp
(
feature
,
FUTURE_DIVISION
)
==
0
)
{
ff
->
ff_features
|=
CO_FUTURE_DIVISION
;
}
else
if
(
strcmp
(
feature
,
FUTURE_ABSIMPORT
)
==
0
)
{
ff
->
ff_features
|=
CO_FUTURE_ABSIMPORT
;
}
else
if
(
strcmp
(
feature
,
FUTURE_ABS
OLUTE_
IMPORT
)
==
0
)
{
ff
->
ff_features
|=
CO_FUTURE_ABS
OLUTE_
IMPORT
;
}
else
if
(
strcmp
(
feature
,
FUTURE_WITH_STATEMENT
)
==
0
)
{
ff
->
ff_features
|=
CO_FUTURE_WITH_STATEMENT
;
}
else
if
(
strcmp
(
feature
,
"braces"
)
==
0
)
{
...
...
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