A suggestion for a possible Python module
Erik Max Francis
max at alcyone.com
Sat Mar 8 16:06:43 EST 2003
Thomas Wouters wrote:
> Well, if you want to, say, index a list of email addresses or
> hostnames with
> btree, and you want to be able to efficiently match domain-parts,
> reversing
> the string is useful. If I were doing such a thing, I would do it all
> the
> time. :)
Sounds like it would be better to reverse the list of dot-separated FQDN
components, which is already available with the list's reverse method:
l = name.split('.')
l.reverse()
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ I am an island / A little freak of melancholy
\__/ Lamya
Official Omega page / http://www.alcyone.com/max/projects/omega/
The official distribution page for the popular Roguelike, Omega.
More information about the Python-list
mailing list