#171 autodoc handling of enums

closed-accepted
nobody
None
5
2007-05-26
2007-04-09
Josh Cherry
No

The autodoc-generated documentation for Python is inconsistent in its treatment of enum types. For function parameters the name of the enum is used, but enum return values are always shown as "int". For example, wrapping

enum EFoo {eFoo0, eFoo1, eFoo2};
EFoo Func(EFoo foo) {return foo;}

yields this documentation string:

"""Func(EFoo foo) -> int"""

The attached patch for 1.3.31 uses the enum name for the return type too, yielding

"""Func(EFoo foo) -> EFoo"""

I ran make check-python-test-suite using the modification, and everything passed.

Discussion

  • Josh Cherry

    Josh Cherry - 2007-04-09

    Patch for autodoc enum handling

     
  • Olly Betts

    Olly Betts - 2007-05-26
    • status: open --> closed-accepted
     
  • Olly Betts

    Olly Betts - 2007-05-26

    Logged In: YES
    user_id=14972
    Originator: NO

    Thanks for the patch - applied to SVN HEAD.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks