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
ec6393f3
Kaydet (Commit)
ec6393f3
authored
Nis 11, 2010
tarafından
Andrew M. Kuchling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add various items
üst
ca2413e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
2 deletions
+59
-2
2.7.rst
Doc/whatsnew/2.7.rst
+59
-2
No files found.
Doc/whatsnew/2.7.rst
Dosyayı görüntüle @
ec6393f3
...
...
@@ -238,10 +238,33 @@ module, but it's easier to use.
PEP 389: The argparse Module for Parsing Command Lines
======================================================
XXX write this section.
The :mod:`argparse` module for parsing command-line arguments was
added, intended as a more powerful replacement for the
:mod:`optparse` module.
This means Python now supports three different modules for parsing
command-line arguments: :mod:`getopt`, :mod:`optparse`, and
:mod:`argparse`. The :mod:`getopt` module closely resembles the C
:cfunc:`getopt` function, so it remains useful if you're writing a
Python prototype that will eventually be rewritten in C.
:mod:`optparse` becomes redundant, but there are no plans to remove it
because there are many scripts still using it, and there's no
automated way to update these scripts. (Making the :mod:`argparse`
API consistent with :mod:`optparse`'s interface was discussed but
rejected as too messy and difficult.)
To summarize, if you're writing a new script and don't need to worry
about compatibility with earlier versions of Python, use
:mod:`argparse` instead of :mod:`optparse`.
XXX need an example
.. seealso::
`argparse module documentation <http://docs.python.org/dev/library/argparse.html>`__
`Upgrading optparse code to use argparse <http://docs.python.org/dev/library/argparse.html#upgrading-optparse-code>`__
:pep:`389` - argparse - New Command Line Parsing Module
PEP written and implemented by Steven Bethard.
...
...
@@ -478,6 +501,29 @@ Some smaller changes made to the core Python language are:
.. ======================================================================
.. _new-27-interpreter:
Interpreter Changes
-------------------------------
A new environment variable, :envvar:`PYTHONWARNINGS`,
allows controlling warnings. It should be set to a string
containing warning settings, equivalent to those
used with the :option:`-W` switch, separated by commas.
(Contributed by Brian Curtin; :issue:`7301`.)
For example, the following setting will print warnings every time
they occur, but turn warnings from the :mod:`Cookie` module into an
error. (The exact syntax for setting an environment variable varies
across operating systems and shells, so it may be different for you.)
::
export PYTHONWARNINGS=all,error:::Cookie:0
.. ======================================================================
Optimizations
-------------
...
...
@@ -720,6 +766,12 @@ changes, or look through the Subversion logs for all the details.
as arguments to its constructor.
(Implemented by Mark Dickinson; :issue:`5812`.)
An oversight was fixed, making the :class:`Fraction` match the other
numeric types; ordering comparisons (``<``, ``<=``, ``>``, ``>=``) between
fractions and complex numbers now raise a :exc:`TypeError`.
.. revision 79455
* New class: a new :class:`~ftplib.FTP_TLS` class in
the :mod:`ftplib` module provides secure FTP
connections using TLS encapsulation of authentication as well as
...
...
@@ -905,7 +957,12 @@ changes, or look through the Subversion logs for all the details.
* The :mod:`socket` module's :class:`~ssl.SSL` objects now support the
buffer API, which fixed a test suite failure. (Fixed by Antoine
Pitrou; :issue:`7133`.)
Pitrou; :issue:`7133`.) The version of OpenSSL being used is
now available as the module attributes
:attr:`OPENSSL_VERSION` (a string),
:attr:`OPENSSL_VERSION_INFO` (a 5-tuple), and
:attr:`OPENSSL_VERSION_NUMBER` (an integer). (Added by Antoine Pitrou;
:issue:`8321`.)
The :func:`~socket.create_connection` function
gained a *source_address* parameter, a ``(host, port)`` 2-tuple
...
...
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