Re: list vs tuple for a dict key- why aren't both hashable?

2009-11-08 Thread Dj Gilcrease
On Sun, Nov 8, 2009 at 11:15 AM, Wells wrote: > I'm not quite understanding why a tuple is hashable but a list is not. > Any pointers? Thanks! tuple is hashable because it is immutable whereas a list is mutable. -- http://mail.python.org/mailman/listinfo/python-list

Re: finding element by tag in xml

2010-02-20 Thread Dj Gilcrease
On Sat, Feb 20, 2010 at 9:27 AM, sWrath swrath wrote: > from xml.dom.minidom import parse > from xml.etree.ElementTree import* > > file1="book.xml" > tmptree=ElementTree() > tmptree.parse(file1) > items=root.getiterator() > > > dom = parse(file1) > > > #Find tag names > for node in items : >    if

Re: [Python-Dev] Mercurial migration: help needed

2009-08-18 Thread Dj Gilcrease
On Tue, Aug 18, 2009 at 2:12 AM, "Martin v. Löwis" wrote: > The second item is line conversion hooks. Dj Gilcrease has posted a > solution which he considers a hack himself. Mark Hammond has also > volunteered, but it seems some volunteer needs to be "in charge",

Application Packages

2009-09-15 Thread Dj Gilcrease
*" or better yet map it to myapp.user? Dj Gilcrease OpenRPG Developer ~~http://www.openrpg.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Application Packages

2009-09-15 Thread Dj Gilcrease
when looking up namespace-packages I found pkgutil which lets me add a myapp.user package with the following in its __init__.py and nothing else import os, os.path from pkgutil import extend_path homedir = os.environ.get('HOME') or os.environ.get('USERPROFILE') __path__ = extend_path([os.path.abs

Re: Are min() and max() thread-safe?

2009-09-16 Thread Dj Gilcrease
I dont see anything wrong with it and it works for me on a sequence of 5000 -- http://mail.python.org/mailman/listinfo/python-list