PyDev and Docstring display...

OOPMan
2007-08-31
2013-03-15
  • OOPMan
    OOPMan
    2007-08-31

    Hey all, new here and new to both PyDev and Python. I was showing PyDev to another dev whose got a bit more experience with Python and he asked whether not PyDev is able to present a class/functions docstring as part of the code completion dialog.

    I have no clue whether this is possible and how to enable it if it is?

    Is it possible?

    Can I get PyDev to display DocString data for the currently highlighted item in the code completion box?

     
    • Fabio Zadrozny
      Fabio Zadrozny
      2007-08-31

      It should do that automatically... are you trying this on something that has a docstring?

      E.g.: if I do a code-completion for RuntimeError it will show the completion and after a few milliseconds the docstring pop-up will show just right to the completion pop-up.

      Cheers,

      Fabio

       
      • Berco Beute
        Berco Beute
        2007-08-31

        It doesn't in my case:

        ubuntu
        eclipse 3.3
        pydev 1.3.8
        jython 2.2
        java 5

         
        • Fabio Zadrozny
          Fabio Zadrozny
          2007-08-31

          Try the following:

          def m1():
              '''
              docstring
              '''
             
          m1#<-- request code-completion here and see if the dostring written above appears...

          Basically, RuntimeError does not have a docstring in jython -- but that's because it's not just not there (actually, for RuntimeError, only python 2.5 would show a docstring).

          Cheers,

          Fabio

           
    • OOPMan
      OOPMan
      2007-09-03

      That works. Thanks for the tip. Blah, I guess I should be a leeeeeeetle more patient with those pop-ups :-)