Skip to content

[3.8] Fix typos and remove deprecated deprecation warning. (GH-17741) #17743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions Doc/library/ctypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,6 @@ as the ``NULL`` pointer)::
0x1d000000
>>>

.. note::

:mod:`ctypes` may raise a :exc:`ValueError` after calling the function, if
it detects that an invalid number of arguments were passed. This behavior
should not be relied upon. It is deprecated in 3.6.2, and will be removed
in 3.7.

:exc:`ValueError` is raised when you call an ``stdcall`` function with the
``cdecl`` calling convention, or vice versa::

Expand Down Expand Up @@ -624,7 +617,7 @@ Structure/union alignment and byte order
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

By default, Structure and Union fields are aligned in the same way the C
compiler does it. It is possible to override this behavior be specifying a
compiler does it. It is possible to override this behavior by specifying a
:attr:`_pack_` class attribute in the subclass definition. This must be set to a
positive integer and specifies the maximum alignment for the fields. This is
what ``#pragma pack(n)`` also does in MSVC.
Expand Down Expand Up @@ -922,7 +915,7 @@ attribute later, after the class statement::
... ("next", POINTER(cell))]
>>>

Lets try it. We create two instances of ``cell``, and let them point to each
Let's try it. We create two instances of ``cell``, and let them point to each
other, and finally follow the pointer chain a few times::

>>> c1 = cell()
Expand Down Expand Up @@ -1125,8 +1118,8 @@ hit the ``NULL`` entry::
>>>

The fact that standard Python has a frozen module and a frozen package
(indicated by the negative size member) is not well known, it is only used for
testing. Try it out with ``import __hello__`` for example.
(indicated by the negative ``size`` member) is not well known, it is only used
for testing. Try it out with ``import __hello__`` for example.


.. _ctypes-surprises:
Expand Down