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
fe4dfd2b
Kaydet (Commit)
fe4dfd2b
authored
Haz 03, 2012
tarafından
Senthil Kumaran
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge heads
üst
1251fafc
2168b31c
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
37 additions
and
36 deletions
+37
-36
code.rst
Doc/c-api/code.rst
+3
-3
conversion.rst
Doc/c-api/conversion.rst
+2
-2
init.rst
Doc/c-api/init.rst
+1
-1
type.rst
Doc/c-api/type.rst
+7
-6
unicode.rst
Doc/c-api/unicode.rst
+1
-1
veryhigh.rst
Doc/c-api/veryhigh.rst
+0
-6
pythonrun.h
Include/pythonrun.h
+5
-2
CallTips.py
Lib/idlelib/CallTips.py
+17
-15
ACKS
Misc/ACKS
+1
-0
No files found.
Doc/c-api/code.rst
Dosyayı görüntüle @
fe4dfd2b
...
@@ -31,11 +31,11 @@ bound into a function.
...
@@ -31,11 +31,11 @@ bound into a function.
Return true if *co* is a :class:`code` object
Return true if *co* is a :class:`code` object
.. c:function:: int PyCode_GetNumFree(PyObject *co)
.. c:function:: int PyCode_GetNumFree(Py
Code
Object *co)
Return the number of free variables in *co*.
Return the number of free variables in *co*.
.. c:function:: PyCodeObject
*
PyCode_New(int argcount, int kwonlyargcount, int nlocals, int stacksize, int flags, PyObject *code, PyObject *consts, PyObject *names, PyObject *varnames, PyObject *freevars, PyObject *cellvars, PyObject *filename, PyObject *name, int firstlineno, PyObject *lnotab)
.. c:function:: PyCodeObject
*
PyCode_New(int argcount, int kwonlyargcount, int nlocals, int stacksize, int flags, PyObject *code, PyObject *consts, PyObject *names, PyObject *varnames, PyObject *freevars, PyObject *cellvars, PyObject *filename, PyObject *name, int firstlineno, PyObject *lnotab)
Return a new code object. If you need a dummy code object to
Return a new code object. If you need a dummy code object to
create a frame, use :c:func:`PyCode_NewEmpty` instead. Calling
create a frame, use :c:func:`PyCode_NewEmpty` instead. Calling
...
@@ -43,7 +43,7 @@ bound into a function.
...
@@ -43,7 +43,7 @@ bound into a function.
version since the definition of the bytecode changes often.
version since the definition of the bytecode changes often.
.. c:function::
int
PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno)
.. c:function::
PyCodeObject*
PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno)
Return a new empty code object with the specified filename,
Return a new empty code object with the specified filename,
function name, and first line number. It is illegal to
function name, and first line number. It is illegal to
...
...
Doc/c-api/conversion.rst
Dosyayı görüntüle @
fe4dfd2b
...
@@ -119,13 +119,13 @@ The following functions provide locale-independent string to number conversions.
...
@@ -119,13 +119,13 @@ The following functions provide locale-independent string to number conversions.
.. versionadded:: 3.1
.. versionadded:: 3.1
.. c:function::
char*
PyOS_stricmp(char *s1, char *s2)
.. c:function::
int
PyOS_stricmp(char *s1, char *s2)
Case insensitive comparison of strings. The function works almost
Case insensitive comparison of strings. The function works almost
identically to :c:func:`strcmp` except that it ignores the case.
identically to :c:func:`strcmp` except that it ignores the case.
.. c:function::
char*
PyOS_strnicmp(char *s1, char *s2, Py_ssize_t size)
.. c:function::
int
PyOS_strnicmp(char *s1, char *s2, Py_ssize_t size)
Case insensitive comparison of strings. The function works almost
Case insensitive comparison of strings. The function works almost
identically to :c:func:`strncmp` except that it ignores the case.
identically to :c:func:`strncmp` except that it ignores the case.
Doc/c-api/init.rst
Dosyayı görüntüle @
fe4dfd2b
...
@@ -646,7 +646,7 @@ with sub-interpreters:
...
@@ -646,7 +646,7 @@ with sub-interpreters:
:c:func:`PyGILState_Release` on the same thread.
:c:func:`PyGILState_Release` on the same thread.
.. c:function:: PyThreadState PyGILState_GetThisThreadState()
.. c:function:: PyThreadState
*
PyGILState_GetThisThreadState()
Get the current thread state for this thread. May return ``NULL`` if no
Get the current thread state for this thread. May return ``NULL`` if no
GILState API has been used on the current thread. Note that the main thread
GILState API has been used on the current thread. Note that the main thread
...
...
Doc/c-api/type.rst
Dosyayı görüntüle @
fe4dfd2b
...
@@ -51,13 +51,13 @@ Type Objects
...
@@ -51,13 +51,13 @@ Type Objects
modification of the attributes or base classes of the type.
modification of the attributes or base classes of the type.
.. c:function:: int PyType_HasFeature(PyObject *o, int feature)
.. c:function:: int PyType_HasFeature(Py
Type
Object *o, int feature)
Return true if the type object *o* sets the feature *feature*. Type features
Return true if the type object *o* sets the feature *feature*. Type features
are denoted by single bit flags.
are denoted by single bit flags.
.. c:function:: int PyType_IS_GC(PyObject *o)
.. c:function:: int PyType_IS_GC(Py
Type
Object *o)
Return true if the type object includes support for the cycle detector; this
Return true if the type object includes support for the cycle detector; this
tests the type flag :const:`Py_TPFLAGS_HAVE_GC`.
tests the type flag :const:`Py_TPFLAGS_HAVE_GC`.
...
@@ -70,13 +70,14 @@ Type Objects
...
@@ -70,13 +70,14 @@ Type Objects
.. c:function:: PyObject* PyType_GenericAlloc(PyTypeObject *type, Py_ssize_t nitems)
.. c:function:: PyObject* PyType_GenericAlloc(PyTypeObject *type, Py_ssize_t nitems)
XXX: Document.
Generic handler for the :attr:`tp_alloc` slot of a type object. Use
Python's default memory allocation mechanism to allocate a new instance and
initialize all its contents to *NULL*.
.. c:function:: PyObject* PyType_GenericNew(PyTypeObject *type, PyObject *args, PyObject *kwds)
.. c:function:: PyObject* PyType_GenericNew(PyTypeObject *type, PyObject *args, PyObject *kwds)
Generic handler for the :attr:`tp_new` slot of a type object.
Initialize
Generic handler for the :attr:`tp_new` slot of a type object.
Create a
all instance variables to *NULL*
.
new instance using the type's :attr:`tp_alloc` slot
.
.. c:function:: int PyType_Ready(PyTypeObject *type)
.. c:function:: int PyType_Ready(PyTypeObject *type)
...
...
Doc/c-api/unicode.rst
Dosyayı görüntüle @
fe4dfd2b
...
@@ -1615,7 +1615,7 @@ They all return *NULL* or ``-1`` if an exception occurs.
...
@@ -1615,7 +1615,7 @@ They all return *NULL* or ``-1`` if an exception occurs.
ISO-8859-1 if it contains non-ASCII characters".
ISO-8859-1 if it contains non-ASCII characters".
.. c:function::
int
PyUnicode_RichCompare(PyObject *left, PyObject *right, int op)
.. c:function::
PyObject*
PyUnicode_RichCompare(PyObject *left, PyObject *right, int op)
Rich compare two unicode strings and return one of the following:
Rich compare two unicode strings and return one of the following:
...
...
Doc/c-api/veryhigh.rst
Dosyayı görüntüle @
fe4dfd2b
...
@@ -95,12 +95,6 @@ the same library that the Python runtime is using.
...
@@ -95,12 +95,6 @@ the same library that the Python runtime is using.
leaving *closeit* set to ``0`` and *flags* set to *NULL*.
leaving *closeit* set to ``0`` and *flags* set to *NULL*.
.. c:function:: int PyRun_SimpleFileFlags(FILE *fp, const char *filename, PyCompilerFlags *flags)
This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below,
leaving *closeit* set to ``0``.
.. c:function:: int PyRun_SimpleFileEx(FILE *fp, const char *filename, int closeit)
.. c:function:: int PyRun_SimpleFileEx(FILE *fp, const char *filename, int closeit)
This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below,
This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below,
...
...
Include/pythonrun.h
Dosyayı görüntüle @
fe4dfd2b
...
@@ -82,9 +82,12 @@ PyAPI_FUNC(struct _mod *) PyParser_ASTFromFile(
...
@@ -82,9 +82,12 @@ PyAPI_FUNC(struct _mod *) PyParser_ASTFromFile(
PyParser_SimpleParseFileFlags(FP, S, B, 0)
PyParser_SimpleParseFileFlags(FP, S, B, 0)
#endif
#endif
PyAPI_FUNC
(
struct
_node
*
)
PyParser_SimpleParseStringFlags
(
const
char
*
,
int
,
PyAPI_FUNC
(
struct
_node
*
)
PyParser_SimpleParseStringFlags
(
const
char
*
,
int
,
int
);
int
);
PyAPI_FUNC
(
struct
_node
*
)
PyParser_SimpleParseStringFlagsFilename
(
const
char
*
,
const
char
*
,
int
,
int
);
PyAPI_FUNC
(
struct
_node
*
)
PyParser_SimpleParseFileFlags
(
FILE
*
,
const
char
*
,
PyAPI_FUNC
(
struct
_node
*
)
PyParser_SimpleParseFileFlags
(
FILE
*
,
const
char
*
,
int
,
int
);
int
,
int
);
#ifndef Py_LIMITED_API
#ifndef Py_LIMITED_API
PyAPI_FUNC
(
PyObject
*
)
PyRun_StringFlags
(
const
char
*
,
int
,
PyObject
*
,
PyAPI_FUNC
(
PyObject
*
)
PyRun_StringFlags
(
const
char
*
,
int
,
PyObject
*
,
...
...
Lib/idlelib/CallTips.py
Dosyayı görüntüle @
fe4dfd2b
...
@@ -67,18 +67,18 @@ class CallTips:
...
@@ -67,18 +67,18 @@ class CallTips:
if
not
sur_paren
:
if
not
sur_paren
:
return
return
hp
.
set_index
(
sur_paren
[
0
])
hp
.
set_index
(
sur_paren
[
0
])
name
=
hp
.
get_expression
()
expression
=
hp
.
get_expression
()
if
not
name
:
if
not
expression
:
return
return
if
not
evalfuncs
and
(
name
.
find
(
'('
)
!=
-
1
):
if
not
evalfuncs
and
(
expression
.
find
(
'('
)
!=
-
1
):
return
return
argspec
=
self
.
fetch_tip
(
name
)
argspec
=
self
.
fetch_tip
(
expression
)
if
not
argspec
:
if
not
argspec
:
return
return
self
.
active_calltip
=
self
.
_calltip_window
()
self
.
active_calltip
=
self
.
_calltip_window
()
self
.
active_calltip
.
showtip
(
argspec
,
sur_paren
[
0
],
sur_paren
[
1
])
self
.
active_calltip
.
showtip
(
argspec
,
sur_paren
[
0
],
sur_paren
[
1
])
def
fetch_tip
(
self
,
name
):
def
fetch_tip
(
self
,
expression
):
"""Return the argument list and docstring of a function or class.
"""Return the argument list and docstring of a function or class.
If there is a Python subprocess, get the calltip there. Otherwise,
If there is a Python subprocess, get the calltip there. Otherwise,
...
@@ -94,25 +94,27 @@ class CallTips:
...
@@ -94,25 +94,27 @@ class CallTips:
"""
"""
try
:
try
:
rpcclt
=
self
.
editwin
.
flist
.
pyshell
.
interp
.
rpcclt
rpcclt
=
self
.
editwin
.
flist
.
pyshell
.
interp
.
rpcclt
except
:
except
AttributeError
:
rpcclt
=
None
rpcclt
=
None
if
rpcclt
:
if
rpcclt
:
return
rpcclt
.
remotecall
(
"exec"
,
"get_the_calltip"
,
return
rpcclt
.
remotecall
(
"exec"
,
"get_the_calltip"
,
(
name
,),
{})
(
expression
,),
{})
else
:
else
:
entity
=
self
.
get_entity
(
name
)
entity
=
self
.
get_entity
(
expression
)
return
get_argspec
(
entity
)
return
get_argspec
(
entity
)
def
get_entity
(
self
,
name
):
def
get_entity
(
self
,
expression
):
"Lookup name in a namespace spanning sys.modules and __main.dict__."
"""Return the object corresponding to expression evaluated
if
name
:
in a namespace spanning sys.modules and __main.dict__.
"""
if
expression
:
namespace
=
sys
.
modules
.
copy
()
namespace
=
sys
.
modules
.
copy
()
namespace
.
update
(
__main__
.
__dict__
)
namespace
.
update
(
__main__
.
__dict__
)
try
:
try
:
return
eval
(
name
,
namespace
)
return
eval
(
expression
,
namespace
)
# any exception is possible if evalfuncs True in open_calltip
except
BaseException
:
#
at least Syntax, Name, Attribute, Index, and Key E. if not
#
An uncaught exception closes idle, and eval can raise any
except
:
# exception, especially if user classes are involved.
return
None
return
None
def
_find_constructor
(
class_ob
):
def
_find_constructor
(
class_ob
):
...
...
Misc/ACKS
Dosyayı görüntüle @
fe4dfd2b
...
@@ -989,6 +989,7 @@ Frank Stajano
...
@@ -989,6 +989,7 @@ Frank Stajano
Joel Stanley
Joel Stanley
Oliver Steele
Oliver Steele
Greg Stein
Greg Stein
Baruch Sterin
Chris Stern
Chris Stern
Alex Stewart
Alex Stewart
Victor Stinner
Victor Stinner
...
...
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