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
6e9d2e68
Kaydet (Commit)
6e9d2e68
authored
Ara 08, 2015
tarafından
Berker Peksag
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #21240: Add an abstractmethod directive to mark abstract methods in the docs more explicitly
üst
45be8d67
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
11 deletions
+25
-11
importlib.rst
Doc/library/importlib.rst
+6
-6
numbers.rst
Doc/library/numbers.rst
+1
-1
selectors.rst
Doc/library/selectors.rst
+4
-4
pyspecific.py
Doc/tools/extensions/pyspecific.py
+14
-0
No files found.
Doc/library/importlib.rst
Dosyayı görüntüle @
6e9d2e68
...
@@ -230,7 +230,7 @@ ABC hierarchy::
...
@@ -230,7 +230,7 @@ ABC hierarchy::
.. deprecated:: 3.3
.. deprecated:: 3.3
Use :class:`MetaPathFinder` or :class:`PathEntryFinder` instead.
Use :class:`MetaPathFinder` or :class:`PathEntryFinder` instead.
.. method:: find_module(fullname, path=None)
..
abstract
method:: find_module(fullname, path=None)
An abstact method for finding a :term:`loader` for the specified
An abstact method for finding a :term:`loader` for the specified
module. Originally specified in :pep:`302`, this method was meant
module. Originally specified in :pep:`302`, this method was meant
...
@@ -453,7 +453,7 @@ ABC hierarchy::
...
@@ -453,7 +453,7 @@ ABC hierarchy::
:pep:`302` protocol for loading arbitrary resources from the storage
:pep:`302` protocol for loading arbitrary resources from the storage
back-end.
back-end.
.. method:: get_data(path)
..
abstract
method:: get_data(path)
An abstract method to return the bytes for the data located at *path*.
An abstract method to return the bytes for the data located at *path*.
Loaders that have a file-like storage back-end
Loaders that have a file-like storage back-end
...
@@ -489,7 +489,7 @@ ABC hierarchy::
...
@@ -489,7 +489,7 @@ ABC hierarchy::
.. versionchanged:: 3.4
.. versionchanged:: 3.4
No longer abstract and a concrete implementation is provided.
No longer abstract and a concrete implementation is provided.
.. method:: get_source(fullname)
..
abstract
method:: get_source(fullname)
An abstract method to return the source of a module. It is returned as
An abstract method to return the source of a module. It is returned as
a text string using :term:`universal newlines`, translating all
a text string using :term:`universal newlines`, translating all
...
@@ -546,7 +546,7 @@ ABC hierarchy::
...
@@ -546,7 +546,7 @@ ABC hierarchy::
when implemented, helps a module to be executed as a script. The ABC
when implemented, helps a module to be executed as a script. The ABC
represents an optional :pep:`302` protocol.
represents an optional :pep:`302` protocol.
.. method:: get_filename(fullname)
..
abstract
method:: get_filename(fullname)
An abstract method that is to return the value of :attr:`__file__` for
An abstract method that is to return the value of :attr:`__file__` for
the specified module. If no path is available, :exc:`ImportError` is
the specified module. If no path is available, :exc:`ImportError` is
...
@@ -586,11 +586,11 @@ ABC hierarchy::
...
@@ -586,11 +586,11 @@ ABC hierarchy::
..
deprecated
::
3.4
..
deprecated
::
3.4
Use
:
meth
:`
Loader
.
exec_module
`
instead
.
Use
:
meth
:`
Loader
.
exec_module
`
instead
.
..
method
::
get_filename
(
fullname
)
..
abstract
method
::
get_filename
(
fullname
)
Returns
:
attr
:`
path
`.
Returns
:
attr
:`
path
`.
..
method
::
get_data
(
path
)
..
abstract
method
::
get_data
(
path
)
Reads
*
path
*
as
a
binary
file
and
returns
the
bytes
from
it
.
Reads
*
path
*
as
a
binary
file
and
returns
the
bytes
from
it
.
...
...
Doc/library/numbers.rst
Dosyayı görüntüle @
6e9d2e68
...
@@ -35,7 +35,7 @@ The numeric tower
...
@@ -35,7 +35,7 @@ The numeric tower
Abstract. Retrieves the imaginary component of this number.
Abstract. Retrieves the imaginary component of this number.
.. method:: conjugate()
..
abstract
method:: conjugate()
Abstract. Returns the complex conjugate. For example, ``(1+3j).conjugate()
Abstract. Returns the complex conjugate. For example, ``(1+3j).conjugate()
== (1-3j)``.
== (1-3j)``.
...
...
Doc/library/selectors.rst
Dosyayı görüntüle @
6e9d2e68
...
@@ -99,7 +99,7 @@ constants below:
...
@@ -99,7 +99,7 @@ constants below:
:class:`BaseSelector` and its concrete implementations support the
:class:`BaseSelector` and its concrete implementations support the
:term:`context manager` protocol.
:term:`context manager` protocol.
.. method:: register(fileobj, events, data=None)
..
abstract
method:: register(fileobj, events, data=None)
Register a file object for selection, monitoring it for I/O events.
Register a file object for selection, monitoring it for I/O events.
...
@@ -112,7 +112,7 @@ constants below:
...
@@ -112,7 +112,7 @@ constants below:
:exc:`ValueError` in case of invalid event mask or file descriptor, or
:exc:`ValueError` in case of invalid event mask or file descriptor, or
:exc:`KeyError` if the file object is already registered.
:exc:`KeyError` if the file object is already registered.
.. method:: unregister(fileobj)
..
abstract
method:: unregister(fileobj)
Unregister a file object from selection, removing it from monitoring. A
Unregister a file object from selection, removing it from monitoring. A
file object shall be unregistered prior to being closed.
file object shall be unregistered prior to being closed.
...
@@ -136,7 +136,7 @@ constants below:
...
@@ -136,7 +136,7 @@ constants below:
:exc:`ValueError` in case of invalid event mask or file descriptor, or
:exc:`ValueError` in case of invalid event mask or file descriptor, or
:exc:`KeyError` if the file object is not registered.
:exc:`KeyError` if the file object is not registered.
.. method:: select(timeout=None)
..
abstract
method:: select(timeout=None)
Wait until some registered file objects become ready, or the timeout
Wait until some registered file objects become ready, or the timeout
expires.
expires.
...
@@ -179,7 +179,7 @@ constants below:
...
@@ -179,7 +179,7 @@ constants below:
This returns the :class:`SelectorKey` instance associated to this file
This returns the :class:`SelectorKey` instance associated to this file
object, or raises :exc:`KeyError` if the file object is not registered.
object, or raises :exc:`KeyError` if the file object is not registered.
.. method:: get_map()
..
abstract
method:: get_map()
Return a mapping of file objects to selector keys.
Return a mapping of file objects to selector keys.
...
...
Doc/tools/extensions/pyspecific.py
Dosyayı görüntüle @
6e9d2e68
...
@@ -164,6 +164,19 @@ class PyCoroutineMethod(PyCoroutineMixin, PyClassmember):
...
@@ -164,6 +164,19 @@ class PyCoroutineMethod(PyCoroutineMixin, PyClassmember):
return
PyClassmember
.
run
(
self
)
return
PyClassmember
.
run
(
self
)
class
PyAbstractMethod
(
PyClassmember
):
def
handle_signature
(
self
,
sig
,
signode
):
ret
=
super
(
PyAbstractMethod
,
self
)
.
handle_signature
(
sig
,
signode
)
signode
.
insert
(
0
,
addnodes
.
desc_annotation
(
'abstractmethod '
,
'abstractmethod '
))
return
ret
def
run
(
self
):
self
.
name
=
'py:method'
return
PyClassmember
.
run
(
self
)
# Support for documenting version of removal in deprecations
# Support for documenting version of removal in deprecations
class
DeprecatedRemoved
(
Directive
):
class
DeprecatedRemoved
(
Directive
):
...
@@ -368,5 +381,6 @@ def setup(app):
...
@@ -368,5 +381,6 @@ def setup(app):
app
.
add_directive_to_domain
(
'py'
,
'decoratormethod'
,
PyDecoratorMethod
)
app
.
add_directive_to_domain
(
'py'
,
'decoratormethod'
,
PyDecoratorMethod
)
app
.
add_directive_to_domain
(
'py'
,
'coroutinefunction'
,
PyCoroutineFunction
)
app
.
add_directive_to_domain
(
'py'
,
'coroutinefunction'
,
PyCoroutineFunction
)
app
.
add_directive_to_domain
(
'py'
,
'coroutinemethod'
,
PyCoroutineMethod
)
app
.
add_directive_to_domain
(
'py'
,
'coroutinemethod'
,
PyCoroutineMethod
)
app
.
add_directive_to_domain
(
'py'
,
'abstractmethod'
,
PyAbstractMethod
)
app
.
add_directive
(
'miscnews'
,
MiscNews
)
app
.
add_directive
(
'miscnews'
,
MiscNews
)
return
{
'version'
:
'1.0'
,
'parallel_read_safe'
:
True
}
return
{
'version'
:
'1.0'
,
'parallel_read_safe'
:
True
}
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