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.
...least for now) for OR patterns, the extra syntactic noise is just tolerated (at least for now). However, membership constraints may offer a future path to reducing the need to combine OR patterns with equality constraints (instead, the values to be checked against would be collected as a set, list, or tuple). Given that perspective, PEP 635's arguments against using ? as part of the pattern matching syntax held for this proposal as well, and so the PEP was amended accordingly. Using __ as the...
...least one personal computer, and this number is still growing. However, while many people nowadays use a computer, few of them are computer programmers. Non-programmers aren't really "empowered" in their computer use: they are confined to using applications in ways that programmers have determined for them. One doesn't need to be a visionary to see that this causes a lot of grief. An even more radical change is the introduction of computing and communication embedded in the home an...
...least as far as the right edge of the title text (4 characters minimum). First-level section titles are underlined with "=" (equals signs), second-level section titles with "-" (hyphens), and third-level section titles with "'" (single quotes or apostrophes). For example: First-Level Title ================= Second-Level Title ------------------ Third-Level Title ''''''''''''''''' If there are more than three levels of sections in your PEP, you may insert overline/underline-adorned titles f...
...least read the discussion listed at the end of this PEP. Abstract This PEP describes an addition to the standard library called Data Classes. Although they use a very different mechanism, Data Classes can be thought of as "mutable namedtuples with defaults". Because Data Classes use normal class definition syntax, you are free to use inheritance, metaclasses, docstrings, user-defined methods, class factories, and other Python class features. A class decorator is provided which inspects a cla...
...least 72 hours after the motion is proposed and shall not be less than 24 hours after the motion is proposed. Votes are completed once all Members have voted even if this occurs before the expiration of the vote, or also if sufficient votes have been case to carry a motion regardless of the direction of further votes. PyCon Ireland 2011 Funding ========================== **RESOLVED**, that the PSF offers a grant of US$1500 to the organizers of the PyCon Ir...
...least by announcing there's an available place?" S. Holden suggested an announcement on the PSF blog. D. Goodger: "A public blog post didn't work well last time. Non-members ran, members didn't elect them." [49] S. Holden will send email to the members list regarding Board nominations. 8 Account Signature Authority D. Goodger: "We only require one signature per check, right? So extra signatories are just bus/continuity insurance." K. Kaiser confirm...
...least." 7 Trademarks Committee (TMC) J. Tauber gave a status report: There are 3 longstanding matters: Python4D, pypi.info and RPyC. The first and third had much discussion but no firm decision. The second one was overwhelmingly negative. I have just sent an email to the committee to discuss the voting process / timeline. We do an okay job with discussion but we need to pin down how to vote. D. Goodger noted that as there was no voting procedure in place, no vote ...
...least the cost is spread over seven months." D. Mertz: "What about a matching funds approach here also?" S. Holden: "So should we suggest that we solicit contributions for this effort? We could run it as an experimental try at "fiscal sponsorship." T. Peters: "I would definitely like to fund the first part: designing the new APIs and developing validation tests." RESOLVED, that the PSF offer a seed funding grant of $4,000 to David R. Murray to initi...
...least emit a warning, and MAY allow the user to force the installation to proceed regardless. Example: "python.constraints": { "installer_must_handle": true, "environments": ["python_version >= 2.6"], "extension_metadata": { "fortranlib": { "fortranlib.compatibility": { "fortran_abi": "openblas-g77" } } } } Supported Environments The environments subfield is a list of strings specifying the environments that the distribution explicitly supports. An envir...
...least it's Python, right?" D. Mertz: "I'd have some reservation about "endorsing" a closed-source product/project." A. Kuchling: "...The lack of open-sourceness is a concern. Also conflict of interest issues for me. But I'm hoping the PSF wouldn't be paying anything at all." S. Holden: "...I'd need to see some fairly detailed specifications." M. von Löwis: "How much effort would it be to setup a small demo installation?" [86] A. Kuchlin...
...least one other programming language, much of Python is intuitive. Very few people will have had any experience with the decorator concept before encountering it in Python. There's just no strong preexisting meme that captures the concept. Syntax discussions in general appear to cause more contention than almost anything else. Readers are pointed to the ternary operator discussions that were associated with PEP 308 for another example of this. Background There is general agreement that syn...
...least a week's duration by the end of August 2009. Resignation of Board Directorship and position as Board Secretary to avoid any conflict of interest. The Board reached an informal consensus without a vote. Details are to be discussed by email in the coming weeks. After returning to the meeting, D. Goodger agreed to the informal proposal. D. Goodger's status (employee vs. contractor) was discussed. Further discussion was deferred to email. K. Kaiser: "I'd like to suggest that PyCon be ...
...least having different levels. How about the rest of you?" T. Peters: "I like levels myself. And I like people picking their own level better than dictating levels based on organization size (or anything else)." D. Mertz: "I prefer levels over strictly voluntary additions, also. I'd still rather have some scale like silver/gold/platinum... with "advice" that organizations of size N should choose level X." S. Holden: R. Hettinger's suggestion was: Small or...
...least-squares regression by typing solve(X.T @ X, X @ y[:, np.newaxis]).flatten() instead of solve(X.T @ X, X @ y). No-one wants to type (a[np.newaxis, :] @ b[:, np.newaxis])[0, 0] instead of a @ b every time they compute an inner product, or (a[np.newaxis, :] @ Mat @ b[:, np.newaxis])[0, 0] for general quadratic forms instead of a @ Mat @ b. In addition, sage and sympy (see below) use these non-associative semantics with an infix matrix multiplication operator (they use *), and they report th...
...least these fields are present when publishing a distribution. Index servers MUST ensure at least these fields are present in the metadata when distributions are uploaded. Installation tools MUST refuse to install distributions with one or more of these fields missing by default, but MAY allow users to force such an installation to occur. Metadata version Version of the file format; "2.0" is the only legal value. Automated tools consuming metadata SHOULD warn if metadata_version is greater than...
...least one existing use of this style in the standard library, in unittest.mock, the code reviewers felt that this was too unusual for the standard library. Consequently, the design has been changed to a more traditional design of separate functions with a pseudo-namespace naming convention, median_low, median_high, etc. Another issue that was of concern to code reviewers was the existence of a function calculating the sample mode of continuous data, with some people questioning the choice of alg...
...least two constraints, if any; specifying a single constraint is disallowed. Subtypes of types constrained by a type variable should be treated as their respective explicitly listed base types in the context of the type variable. Consider this example: class MyStr(str): ... x = concat(MyStr('apple'), MyStr('pie')) The call is valid but the type variable AnyStr will be set to str and not MyStr. In effect, the inferred type of the return value assigned to x will also be str. Additionally, Any ...
Computer Programming for Everybody Computer Programming for Everybody This is the text of a revised funding proposal that we sent to DARPA in August 1999. In March, we heard that at least an earlier version of the proposal was accepted by DARPA; the work has begun late 1999 and will hopefully last two years, although we've only received funding for the first year (through October 2000). We're keeping our fingers crossed for the rest. Unfortunately, the move of the Python developm...
...least) glibc gets it wrong in some cases. The result should be -1.0 if the power is odd and 1.0 if the power is even, and any float with a sufficiently large exponent is (mathematically) an exact even integer. SF bug 759227: A new-style class that implements __nonzero__() must return a bool or int (but not an int subclass) from that method. This matches the restriction on classic classes. The encoding attribute has been added for file objects, and set to the terminal encoding on Unix and Windo...
...least two elements return start == end case _: # anything return False Value Patterns It is good programming style to use named constants for parametric values or to clarify the meaning of particular values. Clearly, it would be preferable to write case (HttpStatus.OK, body): over case (200, body):, for example. The main issue that arises here is how to distinguish capture patterns (variable bindings) from value patterns. The general discussi...