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
9b33ce48
Unverified
Kaydet (Commit)
9b33ce48
authored
Haz 11, 2019
tarafından
Guido van Rossum
Kaydeden (comit)
GitHub
Haz 11, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-35766: What's new in the ast and typing modules (#13984)
üst
44867bb9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
3.8.rst
Doc/whatsnew/3.8.rst
+46
-0
No files found.
Doc/whatsnew/3.8.rst
Dosyayı görüntüle @
9b33ce48
...
@@ -363,6 +363,29 @@ Improved Modules
...
@@ -363,6 +363,29 @@ Improved Modules
================
================
ast
---
AST nodes now have ``end_lineno`` and ``end_col_offset`` attributes,
which give the precise location of the end of the node. (This only
applies to nodes that have ``lineno`` and ``col_offset`` attributes.)
The :func:`ast.parse` function has some new flags:
* ``type_comments=True`` causes it to return the text of :pep:`484` and
:pep:`526` type comments associated with certain AST nodes;
* ``mode='func_type'`` can be used to parse :pep:`484` "signature type
comments" (returned for function definition AST nodes);
* ``feature_version=N`` allows specifying the minor version of an
earlier Python 3 version. (For example, ``feature_version=4`` will
treat ``async`` and ``await`` as non-reserved words.)
New function :func:`ast.get_source_segment` returns the source code
for a specific AST node.
asyncio
asyncio
-------
-------
...
@@ -762,6 +785,29 @@ time
...
@@ -762,6 +785,29 @@ time
Added new clock :data:`~time.CLOCK_UPTIME_RAW` for macOS 10.12.
Added new clock :data:`~time.CLOCK_UPTIME_RAW` for macOS 10.12.
(Contributed by Joannah Nanjekye in :issue:`35702`.)
(Contributed by Joannah Nanjekye in :issue:`35702`.)
typing
------
The :mod:`typing` module incorporates several new features:
* Protocol definitions. See :pep:`544`, :class:`typing.Protocol` and
:func:`typing.runtime_checkable`. Simple ABCs like
:class:`typing.SupportsInt` are now ``Protocol`` subclasses.
* A dictionary type with per-key types. See :pep:`589` and
:class:`typing.TypedDict`.
* Literal types. See :pep:`586` and :class:`typing.Literal`.
* "Final" variables, functions, methods and classes. See :pep:`591`,
:class:`typing.Final` and :func:`typing.final`.
* New protocol class :class:`typing.SupportsIndex`.
* New functions :func:`typing.get_origin` and :func:`typing.get_args`.
unicodedata
unicodedata
-----------
-----------
...
...
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