Discount on Python 3 Standard Library By Example

The new edition of my book, titled The Python 3 Standard Library By Example, will be available soon. Owners of the previous edition, based on Python 2, can receive a discount on the new edition by registering their copies with the publisher.

Visit informit.com/register before 2 May to create an account and register your old edition, regardless of where you purchased it. Note that you’ll need to agree to receive promotional email from them, since that’s how the discount information will be delivered.

After you’ve registered, look for information about the discount to be delivered on 5 May.

Lessons learned from working on large scale, cross-project initiatives in OpenStack

I have been involved with OpenStack development since just before the Folsom summit in 2012. Over the course of that time, I have participated in innumerable discussions about 3 big features tied to OpenStack logging: translating log messages, adding request IDs to log messages, and adding unique message IDs to log messages. We have had various degrees of success with the design, implementation, and ongoing maintenance of all three features, and the reasons for success or failure in each case provide helpful insight into how to approach changes with large community and product scope that should be considered before our next discussion at the summit/forum in Boston in 2017.
Continue reading Lessons learned from working on large scale, cross-project initiatives in OpenStack

yasfb 0.6.1

yasfb is Yet Another Sphinx Feed Builder, and creates an RSS feed for changes in Sphinx documentation.

What’s new in 0.6.1?

  • write feed using utf-8 encoding

yasfb 0.6.0

yasfb is Yet Another Sphinx Feed Builder, and creates an RSS feed for changes in Sphinx documentation.

What’s new in 0.6.0?

  • Enable Python 3 compatibility (contributed by Stephen Finucane)

weakref — Impermanent References to Objects — PyMOTW 3

The weakref module supports weak references to objects. A normal reference increments the reference count on the object and prevents it from being garbage collected. This is not always desirable, either when a circular reference might be present or when building a cache of objects that should be deleted when memory is needed. A weak reference is a handle to an object that does not keep it from being cleaned up automatically.

Read more…

This post is part of the Python Module of the Week series for Python 3. See PyMOTW.com for more articles from the series.

locale — Cultural Localization API — PyMOTW 3

The locale module is part of Python’s internationalization and localization support library. It provides a standard way to handle operations that may depend on the language or location of a user. For example, it handles formatting numbers as currency, comparing strings for sorting, and working with dates. It does not cover translation (see the gettext module) or Unicode encoding (see the codecs module).

Read more…

This post is part of the Python Module of the Week series for Python 3. See PyMOTW.com for more articles from the series.

heapq – Heap Sort Algorithm — PyMOTW 3

A heap is a tree-like data structure where the child nodes have a sort-order relationship with the parents. Binary heaps can be represented using a list or array organized so that the children of element N are at positions 2*N+1 and 2*N+2 (for zero-based indexes). This layout makes it possible to rearrange heaps in place, so it is not necessary to reallocate as much memory when adding or removing items.

Read more…

This post is part of the Python Module of the Week series for Python 3. See PyMOTW.com for more articles from the series.