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.
...editing ten tables in different formats in as many source files, as well as adding getters and setters for the new property. There was no single authority in the code for the schema as a whole. Different aspects of the schema were represented in different ways in different files. We tried to simplify the mess using C++ macros. This worked to a degree, but was still difficult to manage. The schema representation was hampered by the simplistic nature of C++ macros, and the possibilities for expans...
...text file per distribution, one large text file or an anydbm file could be used. This has been rejected for a few reasons. First, performance is probably not an extremely pressing concern as the database is only used when installing or removing software, a relatively infrequent task. Scalability also likely isn't a problem, as people may have hundreds of Python packages installed, but thousands or tens of thousands seems unlikely. Finally, individual text files are compatible with installers...
...files. As security measure, its value is somewhat limited because perfectly valid bytecode can still do horrible things. That situation could change if the concept of restricted execution were to be successfully resurrected. Motivation The Python Virtual Machine executes Python programs that have been compiled from the Python language into a bytecode representation. The PVM assumes that any bytecode being executed is "well-formed" with regard to a number implicit constraints. Some of these ...
...text files, replacing the ugly (in some people's eyes) "U" mode flag. There's a proposal out there to have a new built-in type textfile(filename, mode, encoding). (Shouldn't it have a bufsize argument too?) Support new widgets and/or parameters for Tkinter For a class defined inside another class, the __name__ should be "outer.inner", and pickling should work. (GvR is no longer certain this is easy or even right.) https://bugs.python.org/issue633930 Decide on a clearer deprecation policy (e...
...large objects Current protocol versions export object sizes for various built-in types (str, bytes) as 32-bit ints. This forbids serialization of large data [1]. New opcodes are required to support very large bytes and str objects. Native opcodes for sets and frozensets Many common built-in types (such as str, bytes, dict, list, tuple) have dedicated opcodes to improve resource consumption when serializing and deserializing them; however, sets and frozensets don't. Adding such opcodes would...
...files from the user's GUI actions, but editing them was a much harder problem. Or, rather, reading them into an editable form was a problem. The parser for fetchmail's configuration file syntax is rather elaborate. It's actually written in YACC and Lex, two classic UNIX tools for generating language-parsing code in C. In order for fetchmailconf to be able to edit existing configuration files, I thought it would have to replicate that elaborate parser in Python. I was very reluctant to do this, p...
...larger than can be represented in 31 bits. As such, pickling to a string will raise an exception when the operation is not possible. At least on platforms supporting large files (many of them), pickling large bytes objects to files should be possible via repeated calls to the file.write() method. The bytes type supports the PyBufferProcs interface, but a bytes object provides the additional guarantee that the pointer will not be deallocated or reallocated as long as a reference to the bytes ob...
...largely written in C the same as CPython itself. It can also have commands written for it using any language, including Python. GitLab itself is largely written in Ruby and since it is Open Source software, we would have the ability to submit merge requests to the upstream Community Edition, albeit in language potentially unfamiliar to most Python programmers. Mercurial is better than Git Whether Mercurial or Git is better on a technical level is a highly subjective opinion. This PEP does n...
...text manual http://www.gnu.org/software/gettext/ [7]Unix man page for xgettext -- Notes section http://www.scit.wlv.ac.uk/cgi-bin/mansec?1+xgettext Copyright This document has been placed in the public domain. Source: https://github.com/python/peps/blob/master/pep-3126.txt
...text of the proposal: At the request of some supporters of other languages, I've withdrawn a language comparison chart that contained highly personal and sometimes unfounded opinions of other languages. The table was being used out of context in a way that some found objectionable. (Not all of the table is disputed, but it seems wiser not to engage in direct language comparisons without a lot more documentation.) I've also removed some administrative details from the text and made so...
...large population of users who recognise this need. The introduction of the Distutils packaging system to Python simplified the process of distributing shareable code, and included mechanisms for the capture of package metadata, but did little with the metadata save ship it with the package. An interface to the index should be hosted in the python.org domain, giving it an air of legitimacy that existing catalog efforts do not have. The interface for submitting information to the catalog should be...
...files. Using an URL Another traditional mechanism for versioning APIs is to bake it into the URL, something like /1.0/simple/ or so. This works well for major version changes where olders clients are not expected to be capable of continuing to use it, but it is not well suited to minor version bumps, particularly when the version numbers can be viewed as largely advisory for end users. Copyright This document is placed in the public domain or under the CC0-1.0-Universal license, whichever i...
...large-scale Python projects like Zope were going through these wild contortions to achieve something like class decorators won over the BDFL. Semantics The semantics and design goals of class decorators are the same as for function decorators (PEP 318#current-syntax, PEP 318#design-goals); the only difference is that you're decorating a class instead of a function. The following two snippets are semantically identical: class A: pass A = foo(bar(A)) @foo @bar class A: pass For a detaile...
...large changes into a series of small changes that can be reviewed independently: instead of trying to do everything in one PEP, we focus on providing a minimal-but-solid foundation for further governance decisions. Additional governance models may be added before the final selection. Copyright This document has been placed in the public domain. Source: https://github.com/python/peps/blob/master/pep-8000.rst
...large. The head maintainers should take an active role in keeping up to date with the Python development process. If a head maintainer is unable to function in this way, he or she should announce the intention to step down to the integrators and the rest of the maintainers, so that a replacement can step forward. The integrators should at all times be capable of reaching the head maintainers by email. In the case where no head maintainer can be found (possibly because there are no maintainers ...
...large inputs). This method would be used before the execute() method is invoked. Note that this method is optional and is merely provided for higher performance database interaction. Implementations are free to do nothing and users are free to not use it. setoutputsize(size [,col]) (Note: this method is not well-defined yet.) Set a column buffer size for fetches of large columns (e.g. LONG). The column is specified as an index into the result tuple. Using a column of None will set the default...
...editing by a human being (e.g. the syntax is more verbose than necessary while not allowing for comments). An example JSON file for the proposed data would be: { "build": { "requires": [ "setuptools", "wheel>=0.27" ] } } YAML The YAML format [8] was designed to be a superset of JSON [7] while being easier to work with by hand. There are three main issues with YAML. One is that the specification is large: 86 pages if printed on letter-sized p...
...largely equivalent. For this reason this PEP will largely ignore the technical arguments about the VCS system and will instead focus on the social aspects. It is not possible to get exact numbers for the number of projects or people which are using a particular VCS, however we can infer this by looking at several sources of information for what VCS projects are using. The Open Hub (previously Ohloh) statistics [1] show that 37% of the repositories indexed by The Open Hub are using Git (second on...
...large number of standard modules. After implementing this PEP one can use following filtering scheme: logging.getLogger('py.BaseHTTPServer').setLevel(logging.FATAL) PEP Deferral Further exploration of the concepts covered in this PEP has been deferred for lack of a current champion interested in promoting the goals of the PEP and collecting and incorporating feedback, and with sufficient available time to do so effectively. Rationale There are a couple of situations when output to stdout o...
...Text, \ LEFT, DISABLED, NORMAL, RIDGE, END Write multiple import statements: from Tkinter import Tk, Frame, Button, Entry, Canvas, Text from Tkinter import LEFT, DISABLED, NORMAL, RIDGE, END (import * is not an option ;-) Instead, it should be possible to use Python's standard grouping mechanism (parentheses) to write the import statement: from Tkinter import (Tk, Frame, Button, Entry, Canvas, Text, LEFT, DISABLED, NORMAL, RIDGE, END) This part of the proposal had BDFL approval f...