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
5e2c5fa1
Kaydet (Commit)
5e2c5fa1
authored
May 30, 2002
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
imp_load_module(): correct and comment the sense of the test for '+'
in the mode (it's forbidden).
üst
4ae6faed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
import.c
Python/import.c
+7
-2
No files found.
Python/import.c
Dosyayı görüntüle @
5e2c5fa1
...
...
@@ -2408,11 +2408,16 @@ imp_load_module(PyObject *self, PyObject *args)
&
name
,
&
fob
,
&
pathname
,
&
suffix
,
&
mode
,
&
type
))
return
NULL
;
if
(
*
mode
&&
!
(
*
mode
==
'r'
||
*
mode
==
'U'
||
strchr
(
mode
,
'+'
)))
{
if
(
*
mode
)
{
/* Mode must start with 'r' or 'U' and must not contain '+'.
Implicit in this test is the assumption that the mode
may contain other modifiers like 'b' or 't'. */
if
(
!
(
*
mode
==
'r'
||
*
mode
==
'U'
)
||
strchr
(
mode
,
'+'
))
{
PyErr_Format
(
PyExc_ValueError
,
"invalid file open mode %.200s"
,
mode
);
return
NULL
;
}
}
if
(
fob
==
Py_None
)
fp
=
NULL
;
...
...
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