When is a __dict__ not a __dict__?

Discussion in 'Python' started by Derek Fountain, Apr 21, 2004.

  1. Am I correct in thinking that a Python object which comes from a bit of C
    code doesn't have a __dict__ attribute? I'm trying to poke around inside
    the objects which control the expat XML parser, but they don't seem to have
    __dict__s.
     
    Derek Fountain, Apr 21, 2004
    #1
    1. Advertising

  2. Derek Fountain

    John Roth Guest

    "Derek Fountain" <> wrote in message
    news:4085f2a4$0$16601$...
    > Am I correct in thinking that a Python object which comes from a bit of C
    > code doesn't have a __dict__ attribute? I'm trying to poke around inside
    > the objects which control the expat XML parser, but they don't seem to

    have
    > __dict__s.


    It depends on the object. Some do, many don't.

    John Roth
     
    John Roth, Apr 21, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ed Young
    Replies:
    4
    Views:
    336
    Ed Young
    Aug 10, 2003
  2. Replies:
    1
    Views:
    354
    Alex Martelli
    Nov 6, 2003
  3. Jean Brouwers

    __slots__ vs __dict__

    Jean Brouwers, May 12, 2004, in forum: Python
    Replies:
    5
    Views:
    525
    Marcus von Appen
    May 13, 2004
  4. Hornberger, Chris

    RE: __slots__ vs __dict__

    Hornberger, Chris, May 12, 2004, in forum: Python
    Replies:
    1
    Views:
    439
    Jean Brouwers
    May 12, 2004
  5. Steven Bethard

    assigning a custom mapping type to __dict__

    Steven Bethard, Mar 1, 2005, in forum: Python
    Replies:
    8
    Views:
    446
    Steven Bethard
    Mar 2, 2005
Loading...

Share This Page