Re: How do I install libxml2 and libxslt?

2009-11-02 Thread Nat Williams
On Mon, Nov 2, 2009 at 9:41 AM, Kevin Ar18 wrote: > I want to use the lxml library, but can't get it to work on Windows. > > The following will not work: > * import libxml2 > * import libxslt > * from lxml import etree > > Here's the instructions: > http://codespeak.net/lxml/installation.html >

Re: Inheriting dictionary

2009-08-18 Thread Nat Williams
On Tue, Aug 18, 2009 at 2:44 PM, Pavel Panchekha wrote: > I want a dictionary that will transparently "inherit" from a parent > dictionary. So, for example: > > """ > a = InheritDict({1: "one", 2: "two", 4: "four"}) > b = InheritDict({3: "three", 4: "foobar"}, inherit_from=a) > > a[1] # "one" > a[

Re: Newbie Question regarding __init__()

2009-07-31 Thread Nat Williams
As MRAB described, ALL instance methods need to accept 'self' as a first parameter, as that will be passed to them implicitly when they are called. This includes __init__. The name 'self' is just a commonly accepted convention for the name of the instance object passed to methods. You don't have