class in IronPython?

Discussion in 'Python' started by Mike Greaves, Aug 11, 2004.

  1. Mike Greaves

    Mike Greaves Guest

    I see from Google groups that I'm not the only one to have this
    problem...

    In Jim H.'s new IronPython 0.6:

    mono bin/IronPythonConsole.exe
    >>> class myClass:

    .... pass
    ....
    System.NullReferenceException: Object reference not set to an instance
    of an object

    ....

    Am I missing something basic?
    Yes, I suspected Mono, and so tried it in .NET 1.1 on an XP
    machine...
    And actual working (non-empty) classes don't work either.

    Is the class mechanism not yet implemented? Does Jim say as much in a
    doc or a posting somewhere?

    Thanks for any insight.

    Mike Greaves
     
    Mike Greaves, Aug 11, 2004
    #1
    1. Advertising

  2. Mike Greaves

    Duncan Booth Guest

    (Mike Greaves) wrote in
    news::

    > In Jim H.'s new IronPython 0.6:
    >
    > mono bin/IronPythonConsole.exe
    >>>> class myClass:

    > ... pass
    > ...
    > System.NullReferenceException: Object reference not set to an instance
    > of an object
    >
    > ...
    >
    > Am I missing something basic?


    I think you will find that classes don't (yet) work in interactive mode.
    Try putting the class in a .py file and using that.
     
    Duncan Booth, Aug 11, 2004
    #2
    1. Advertising

  3. Mike Greaves

    Mike Greaves Guest

    Duncan Booth <> wrote in message news:<Xns9542798386952duncanrcpcouk@127.0.0.1>...

    > I think you will find that classes don't (yet) work in interactive mode.
    > Try putting the class in a .py file and using that.


    Thanks. I *was* trying to debug a .py file in the first place... by
    trying snippets of it interactively... Then I failed to realize that
    I was getting a *different* exception in interactive mode...

    Mike Greaves
     
    Mike Greaves, Aug 11, 2004
    #3
    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. E11
    Replies:
    1
    Views:
    4,844
    Thomas Weidenfeller
    Oct 12, 2005
  2. CHEN Benfeng

    Is IronPython open source or not ?

    CHEN Benfeng, May 6, 2004, in forum: Python
    Replies:
    3
    Views:
    308
    Michael Hudson
    May 6, 2004
  3. Neuruss

    IronPython-0.6 is now available!

    Neuruss, Jul 28, 2004, in forum: Python
    Replies:
    85
    Views:
    1,378
    Neuruss
    Aug 15, 2004
  4. Hoang Do

    IronPython and collections access

    Hoang Do, Aug 18, 2004, in forum: Python
    Replies:
    1
    Views:
    339
    Lawrence Oluyede
    Aug 18, 2004
  5. David Wilson

    [IronPython] Jim Hugunin's web log.

    David Wilson, Aug 30, 2004, in forum: Python
    Replies:
    13
    Views:
    493
    Neuruss
    Sep 6, 2004
Loading...

Share This Page