Menu ▾ ▴

code completion of function parameters

Boris G
2008-10-23
2013-03-15
  • Boris G

    Boris G - 2008-10-23

    Hello,
    consider a function that is defined as follows:
    def f (obj_of_class_X):

    I want to be able to see the public interface of obj_of_class_X object, but naturally PyDev has no idea what is the class of that object. To workaround this problem I put the following line at the beginning of the function:
    obj_of_class_X = X()  #DELETE ME

    Now code completion works fine, however I do have to remember to delete this bogus line. Is there a cleaner way to workaround this problem?

    Thanks

     
    • Fabio Zadrozny

      Fabio Zadrozny - 2008-10-23

      If you put an assert isinstance(obj_of_class_X, X), it should do the trick.

      Cheers,

      Fabio