What past problems of mine the collections module solvesThe somewhat new collections module has a number of useful things that obsolete several of the things I've done by hand in the past. For my own reference if nothing else, here's more or less what its solutions obsolete and when each solution was introduced.
The reason (I suspect that the Pythonic view is that one should just go straight to full structures and add ordering there, instead of trying to hijack lists. A proper discussion of the issue does not fit within the margins of this entry.) Unfortunately, I'm not going to get to use the collections module very much any time soon; most of our systems are old enough that they are running Python 2.4, and that's not likely to change. Even the more recent and fast-moving ones are only on Python 2.5, and based on the speed of updates around here, it will probably be at least a year before I'm using Python 2.6 anywhere. (For the curious: Solaris 10, Red Hat Enterprise 5, and Ubuntu 6.06 all have Python 2.4 and are almost sure to stay that way for their lifetimes. Ubuntu 8.04 and Fedora 10 have Python 2.5, although it looks like the next version of Fedora will have 2.6.) |
These are my WanderingThoughts GettingAround This is part of CSpace, and is written by ChrisSiebenmann. * * * Atom feeds are available; see the bottom of most pages. Categories: links, linux, programming, python, snark, solaris, spam, sysadmin, tech, unix, web |