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
a275c989
Kaydet (Commit)
a275c989
authored
Ock 20, 2011
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add more examples
üst
d9c4a025
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
15 deletions
+26
-15
inspect.rst
Doc/library/inspect.rst
+4
-4
3.2.rst
Doc/whatsnew/3.2.rst
+22
-11
No files found.
Doc/library/inspect.rst
Dosyayı görüntüle @
a275c989
...
...
@@ -637,9 +637,9 @@ generator to be determined easily.
Get current state of a generator-iterator.
Possible states are:
-
GEN_CREATED: Waiting to start execution.
-
GEN_RUNNING: Currently being executed by the interpreter.
-
GEN_SUSPENDED: Currently suspended at a yield expression.
-
GEN_CLOSED: Execution has completed.
*
GEN_CREATED: Waiting to start execution.
*
GEN_RUNNING: Currently being executed by the interpreter.
*
GEN_SUSPENDED: Currently suspended at a yield expression.
*
GEN_CLOSED: Execution has completed.
.. versionadded:: 3.2
Doc/whatsnew/3.2.rst
Dosyayı görüntüle @
a275c989
...
...
@@ -510,16 +510,23 @@ Some smaller changes made to the core Python language are:
* The internal :c:type:`structsequence` tool now creates subclasses of tuple.
This means that C structures like those returned by :func:`os.stat`,
:func:`time.gmtime`, and :
func
:`sys.version_info` now work like a
:func:`time.gmtime`, and :
attr
:`sys.version_info` now work like a
:term:`named tuple` and now work with functions and methods that
expect a tuple as an argument. This is a big step forward in making the C
structures as flexible as their pure Python counterparts.
structures as flexible as their pure Python counterparts:
>>> isinstance(sys.version_info, tuple)
True
>>> 'Version %d.%d.%d %s(%d)' % sys.version_info
'Version 3.2.0 final(0)'
(Suggested by Arfrever Frehtes Taifersar Arahesis and implemented
by Benjamin Peterson in :issue:`8413`.)
* Warnings are now easier to control using the :envvar:`PYTHONWARNINGS`
environment variable as an alternative to using ``-W`` at the command line.
environment variable as an alternative to using ``-W`` at the command line::
$ export PYTHONWARNINGS='ignore::RuntimeWarning::,once::UnicodeWarning::'
(Suggested by Barry Warsaw and implemented by Philip Jenvey in :issue:`7301`.)
...
...
@@ -578,7 +585,9 @@ Some smaller changes made to the core Python language are:
(See :issue:`10518`.)
* Python's import mechanism can now load modules installed in directories with
non-ASCII characters in the path name.
non-ASCII characters in the path name:
>>> import møøse.bites
(Required extensive work by Victor Stinner in :issue:`9425`.)
...
...
@@ -1375,19 +1384,21 @@ inspect
* The :mod:`inspect` module has a new function
:func:`~inspect.getgeneratorstate` to easily identify the current state of a
generator as one of *GEN_CREATED*, *GEN_RUNNING*, *GEN_SUSPENDED* or
*GEN_CLOSED*::
generator-iterator::
>>> from inspect import getgeneratorstate
>>> def gen():
yield 'one'
yield 'two'
yield 'demo'
>>> g = gen()
>>>
inspect.
getgeneratorstate(g)
>>> getgeneratorstate(g)
'GEN_CREATED'
>>> next(g)
'
one
'
>>>
inspect.
getgeneratorstate(g)
'
demo
'
>>> getgeneratorstate(g)
'GEN_SUSPENDED'
>>> next(g, None)
>>> getgeneratorstate(g)
'GEN_CLOSED'
(Contributed by Rodolpho Eckhardt and Nick Coghlan, :issue:`10220`.)
...
...
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