Definitive documentation on newstyle classes? (WAS: Pickling andinheritance are making me hurt)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Daniel Bickett

    Definitive documentation on newstyle classes? (WAS: Pickling andinheritance are making me hurt)

    I was reading the "Pickling and inheritance are making me hurt"
    thread, and the latest suggestion (as of this posting) was to do with
    the __setstate__ and __getstate__ methods. They caught my attention
    because I hadn't encountered them before, and it reminded me that in
    the past I've never been able to very good, definitive documentation
    on newstyle classes. Googling for it gives little python tutorials on
    various sites, and even searching this newsgroup returns very specific
    questions, as a rule.

    Alas, the question: Does there exist a page that enumerates all of the
    features of the newstyle classes, and explains what they all do? If
    so, can anyone provide me with such a link?

    Thanks :-)
    --
    Daniel Bickett
    dbickett at gmail.com

  • Bruno Desthuilliers

    #2
    Re: Definitive documentation on newstyle classes? (WAS: Picklingand inheritance are making me hurt)

    Daniel Bickett a écrit :[color=blue]
    > I was reading the "Pickling and inheritance are making me hurt"
    > thread, and the latest suggestion (as of this posting) was to do with
    > the __setstate__ and __getstate__ methods. They caught my attention
    > because I hadn't encountered them before, and it reminded me that in
    > the past I've never been able to very good, definitive documentation
    > on newstyle classes.[/color]

    Well, the fact is that __[get|set]state__() have nothing to do with new
    style classes, but with the Pickle protocol:


    (snip)
    Bruno

    Comment

    • Daniel Bickett

      #3
      Re: Definitive documentation on newstyle classes? (WAS: Picklingand inheritance are making me hurt)

      Bruno Desthuilliers wrote:[color=blue]
      > Well, the fact is that __[get|set]state__() have nothing to do with new
      > style classes, but with the Pickle protocol:
      > http://www.python.org/doc/2.3.4/lib/pickle-inst.html[/color]

      Thank you for pointing that out, but all the same ;)

      --
      Daniel Bickett
      dbickett at gmail.com

      Comment

      Working...