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.
...Patterns - An Optimization Anecdote Warning This page stays here for historical reasons and it may contain outdated or incorrect information. The other day, a friend asked me a seemingly simple question: what's the best way to convert a list of integers into a string, presuming that the integers are ASCII values. For instance, the list [97, 98, 99] should be converted to the string 'abc'. Let's assume we want to write a function to do this. The first version I came up with...
...patterns on the inside are generally permitted, but subject to approval. In order to determine if shape is preserved, it is often useful to try reducing your design to monochrome to establish that outlines are intact. For example, these are the original logo and a monochrome version which would be permitted. Likewise the logo for PyCon Zimbabwe 2017 adds rich visual elements while preserving the shape. Original Monochrome Comment Flat or slightly gradient colors can easily be flood fi...
...pattern is now special-cased to avoid the recursion limit. (New in 2.3b1.) Bastion and rexec - these modules are disabled, because they aren't safe in Python 2.3 (nor in Python 2.2). (New in 2.3a2.) bsddb - the old bsddb module has finally been retired. The formerly 3rd party PyBSDDB wrapper is now available in Python 2.3, as the bsddb package. This is compatible with Sleepycat Berkeley DB versions 3.0 to 4.1. New in 2.3a2: the Windows installer now ships with Sleepycat's 4.1.25.NC, the l...
...pattern and match object methods in SRE, the standard regular expression engine. In SRE, fixed error with negative lookahead and lookbehind that manifested itself as a runtime error in patterns like "(?<!abc)(def)". Several bugs in the Unicode handling and error handling in _tkinter were fixed. Fix memory management errors in Merge() and Tkapp_Call() routines. Several changes were made to cStringIO to make it compatible with the file-like object interface and with Stri...
...patterns. Remember, there is nothing wrong with using from Package import specific_submodule! In fact this becomes the recommended notation unless the importing module needs to use submodules with the same name from different packages. Intra-package References The submodules often need to refer to each other. For example, the surround module might use the echo module. In fact, such references are so common that the import statement first looks in the containing package before...
...pattern object for a string or unicode object in sre.compile() when a different type pattern with the same value exists. Added countcallers arg to trace.Trace class (--trackcalls command line arg when run from the command prompt). Fixed a caching bug in platform.platform() where the argument of 'terse' was not taken into consideration when caching value. Added two new command-line arguments for profile (output file and default sort). Added global runctx function to profile module Add hlist missi...
...pattern matching, I am still more likely to tinker up a Perl-regexp-based solution than to reach for Python. For good recent examples of such things, see the timeseries and growthplot scripts in the fetchmail distribution. Actually, these are much like the things Perl did in its original role as a sort of combination awk/sed/grep/sh, before it had functions and direct access to the operating system API. For anything larger or more complex, I have come to prefer the subtle virtues of Python -- an...
...pattern and generates better code for it. I'm all for that, provided it can be shown that the generated code is either significantly faster, significantly smaller, or both. This project would probably a lot easier after the compiler refactoring proposed above in the comments for PEPs 266, 267, 280. PEP 276 - Simple Iterator for ints - Althoff I made the mistake of telling the author that I found this butt-ugly. Whatever the words, I do think it flies in the face of being Pythonic....
...pattern object for a string or unicode object in sre.compile() when a different type pattern with the same value exists. Bug #924361: Properly support normalization of empty unicode strings. Fixed a caching bug in platform.platform() where the argument of 'terse' was not taken into consideration when caching value. Bug #920575: A problem that _locale module segfaults on nl_langinfo(ERA) caused by GNU libc's illegal NULL return is fixed. Bug #883604: Fix Lib/test/test_strftime.py to escape ch...
...pattern of many projects. Early August: Let Adrianna Tan <adrianna@pentopixel.net> who runs a Singapore Python User Group know that a derived logo that slightly modified both shape and substantially modified colors would be acceptable if shape was preserved, but colors could be modified to fit with broader design. Early August: Clarified nominative use for Jonathan Baudoin <jonathan.baudoin@simple-it.fr> who wanted to use Python logo on book covers. Early August: Let Yung-Yu ...
...pattern of 'PySomething' names to indicate association with Python. They also used a logo that does not modify the shape of the protected logo, but incorporates it into a larger design. Jan Dittberner <jan@dittberner.info> requested use of the unaltered logo on merchandise and proposed to give revenues to the PSF. I informed him the use was permitted, and that we would be very happy to accept donations, but did not require a specific agreement for such donation as a condition of the ...
...pattern.split(), pattern.sub(), and pattern.subn() methods have been rewritten in C. Also, an experimental function/method finditer() has been added, which works like findall() but returns an iterator. Tix exposes more commands through the classes DirSelectBox, DirSelectDialog, ListNoteBook, Meter, CheckList, and the methods tix_addbitmapdir, tix_cget, tix_configure, tix_filedialog, tix_getbitmap, tix_getimage, tix_option_get, and tix_resetoptions. Traceback objects are now scanned by cyclic ga...
...patterned signoff lines -- I mean compared to us > normal humans who repeatedly use the same exact sigs in message > after message. I think he/it's been dropping us a hint all > along with the "tim_one" address!! Ya, ya, ya, except ... if I were built out of KSR chips, I'd be running at 25 or 50 MHz, and would be wrong about ALMOST EVERYTHING almost ALL THE TIME just due to being a computer! Think about it -- when's the last time you spent 20 hours straight debugging your so...
...pattern in programming scope: users will be customizing applications and appliances in the context of the system's computational model and software framework. Thus our expedition will explore ways to modularize applications, and organize these modules so that users can add the small bits of functionality they want without having to concern themselves with the operation of the system as a whole. One of the key goals of empowering non-programmers to modify and customize software in the cont...
...Pattern compatible with Python 3.3 Approved, 7–0-0 by IRC vote, 01 October 2014. RESOLVED, that the Python Software Foundation recommends RhodeCode as a pending PSF Sponsor Member to the PSF Membership Approved, 8-0-0 by IRC vote, 01 October 2014. RESOLVED, that the Python Software Foundation recommends Continuum as a pending PSF Sponsor Member to the PSF Membership Approved, 7-0-1 by IRC vote, 12 September 2014. RESOLVED, that the Python Software Foundation sponsor the Python Argentina 20...
If you didn't find what you need, try your search in the Python language documentation.