Notice: While JavaScript is not essential for this website, your interaction with the content will be limited. Please turn JavaScript on for the full experience.
...large patch, must include test cases for the regression test and documentation. A patch should not be checked in until the tests and documentation are ready. If you fix a bug, you should write a test case that would have caught the bug. If you commit a patch from the SF Patch Manager or fix a bug from the Jitterbug database, be sure to reference the patch/bug number in the CVS log message. Also be sure to change the status in the patch manager or bug database (if you have access to the bug dat...
...large-scale changes have been recorded yet. Copyright This document has been placed in the public domain. Source: https://github.com/python/peps/blob/master/pep-0392.txt
...text PEP 412: Key-Sharing Dictionary PEP 414: Explicit Unicode Literal for Python 3.3 PEP 415: Implement context suppression with exception attributes PEP 417: Including mock in the Standard Library PEP 418: Add monotonic time, performance counter, and process time functions PEP 420: Implicit Namespace Packages PEP 421: Adding sys.implementation PEP 3118: Revising the buffer protocol (protocol semantics finalised) PEP 3144: IP Address manipulation library PEP 3151: Reworking the OS and IO except...
...text, so Unicode provides several ways to alter it. The most basic are directional marks, which are invisible but affect text as a left-to-right (or right-to-left) character would. Continuing with the s = "X" example above, in the next example the X is replaced by the Latin x followed or preceded by a right-to-left mark (U+200F). This assigns a 200-character string to s (100 copies of x interspersed with 100 invisible marks), but under Unicode rules for general text, it is rendered as s = "x" fo...
...large amount of Python code that assumes that string data is represented as str instances. The long-term plan for Python is to phase out the str type and use unicode for all string data. Clearly, a smooth migration path must be provided. We need to upgrade existing libraries, written for str instances, to be made capable of operating in an all-unicode string world. We can't change to an all-unicode world until all essential libraries are made capable for it. Upgrading the libraries in one shot...
...files, an installer SHOULD emit a warning when it does decide to install a yanked file. That warning MAY utilize the value of the data-yanked attribute (if it has a value) to provide more specific feedback to the user about why that file had been yanked. Mirrors Mirrors can generally treat yanked files one of two ways: They may choose to omit them from their simple repository API completely, providing a view over the repository that shows only "active", unyanked files. They may choose to incl...
...Text supports the splitText method. Build issues For Unix (and Unix-compatible) builds, configuration and building of extension modules is now greatly automated. Rather than having to edit the Modules/Setup file to indicate which modules should be built and where their include files and libraries are, a distutils-based setup.py script now takes care of building most extension modules. All extension modules built this way are built as shared libraries. Only a few modules that must be linked...
...large lists, there are two common uses cases where the existing array-based list outperforms the existing BList reference implementation. These are: A large LIFO stack, where there are many .append() and .pop(-1) operations. Each operation is O(1) for an array-based list, but O(log n) for the BList. A large list that does not change size. The getitem and setitem calls are O(1) for an array-based list, but O(log n) for the BList. In performance tests on a 10,000 element list, BLists exhibite...
...large, there is no adverse effect on users of the language. By selecting a fixed but large limit for these values, it is possible to have both safety and efficiency whilst causing no inconvenience to human programmers and only very rare problems for code generators. One million The value "one million" is very easy to remember. The one million limit is mostly a limit on human generated code, not runtime sizes. One million lines in a single module is a ridiculous concentration of code; the entire...
...large changes are delivered together, a complex investigation may be required to determine the root cause of any new issues that arise. Large batch sizes also make it more likely that problems will be encountered, given that they include larger pieces of relatively untested code. The easiest way to simplify those investigations and reduce the likelihood of users encountering problems is to reduce the size of the batches being shipped. PEP 602 proposes to address this problem via the straightforw...
...text. Here's an example, using a module named 'DES': >>> import DES >>> obj = DES.new('abcdefgh', DES.MODE_ECB) >>> plaintext = "Guido van Rossum is a space alien." >>> len(plaintext) 34 >>> obj.encrypt(plaintext) Traceback (innermost last): File "<stdin>", line 1, in ? ValueError: Strings for DES must be a multiple of 8 in length >>> ciphertext = obj.encrypt(plain+'XXXXXX') # Add padding >>> ciphertext '\021,\343Nq\214D...
...largely superseded by argparse. wsgiref Web site:None Standard library name: Â wsgiref Contact Person:Phillip J. Eby This module is maintained in the standard library, but significant bug reports and patches should pass through the Web-SIG mailing list [2] for discussion. References [1]Fredrik's handing over of ElementTree (https://mail.python.org/pipermail/python-dev/2012-February/116389.html) [2]Web-SIG mailing list (https://mail.python.org/mailman/listinfo/web-sig) Co...
...large benefit to breakage ratio, and the incompatibility should be easy to resolve in affected code. For example, adding an stdlib module with the same name as a third party package is generally not acceptable. Adding a method or attribute that conflicts with 3rd party code through inheritance, however, is likely reasonable. Unless it is going through the deprecation process below, the behavior of an API must not change in an incompatible fashion between any two consecutive releases. Python's...
...text (aka ASCII-encoded text). The addition of the new constructors, methods, and iterators will aid both in writing new wire format code, and in porting any remaining Python 2 wire format code. Common use-cases include dbf and pdf file formats, email formats, and FTP and HTTP communications, among many others. Proposals Addition of explicit "count and byte initialised sequence" constructors To replace the now discouraged behavior, this PEP proposes the addition of an explicit fromsize alter...
...files. Note: the alpha installers don't include the documentation. The Windows installer now installs by default in \Python16\ on the default volume, instead of \Program Files\Python-1.6\. Changed Tools IDLE - complete overhaul. See the IDLE home page for more information. (Python 1.6 alpha 1 will come with IDLE 0.6.) Tools/i18n/pygettext.py - Python equivalent of xgettext(1). A message text extraction tool used for internationalizing applications written in Python. ...
...large 'long' integers or floating point numbers. Comparing long integers larger than the largest floating point number representable against any float will result in an exception being raised: >>> cmp(1.0, 10**309) Traceback (most recent call last): File "<stdin>", line 1, in ? OverflowError: long int too large to convert to float Even when large integers are compared against positive infinity: >>> cmp(1e309, 10**309) Traceback (most recent call last): File "<stdin...
...files to generate the required information. However, CPython's C-API functions often require additional initialization and cleanup snippets that would be hard to specify in a cdef. PEP 436 proposes a domain specific language (DSL) enclosed in C comments that largely resembles a per-parameter configuration file. A preprocessor reads the comment and emits an argument parsing function, docstrings and a header for the function that utilizes the results of the parsing step. The latter function is sub...
...files to a build directory before invoking build_wheel. Looking at existing build systems, we found that passing a build directory into build_wheel made more sense for many tools than pre-emptively copying files into a build directory. The idea of passing build_wheel a build directory was then also deemed an unnecessary complication. Build tools can use a temporary directory or a cache directory to store intermediate files while building. If there is a need, a frontend-controlled cache directory...
...large part of the last several years of Python's development. Its release, as well as a bevy of changes to the language introduced by it and the previous 2.6.x releases, puts alternative implementations at a severe disadvantage in "keeping pace" with core python development. Additionally, many of the changes put into the recent releases of the language as implemented by CPython have not yet seen widespread usage by the general user population. For example, most users are limited to the version o...
...text was copied shamelessly from The Django project's governance document. Copyright Text copied from Django used under their license. The rest of this document has been placed in the public domain. Source: https://github.com/python/peps/blob/master/pep-8016.rst