Python Forum
iPython tab completion of method variable
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
iPython tab completion of method variable
#2
I found my answer.  as of python 3.5 


import typing

def foo(bar: int) --> int:
    return bar**2

in ipython when you enter,  "foo()" it wll prompt with "bar: int returns int". this also works with class types.

class Baz:
    def __init__(self):
        pass

def foo(bar: Baz) --> None:
    pass
Moderator Larz60+: Added Python tags. Please do this in the future (see help, BBCODE) second notice
Reply


Messages In This Thread
RE: iPython tab completion of method variable - by sixteenornumber - Apr-04-2017, 02:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  IPython errors for numpy array min/max methods muelaner 1 731 Nov-04-2023, 09:22 PM
Last Post: snippsat
  Can a program execute code in iPython shell and get result? deanhystad 3 1,916 Jun-17-2022, 03:45 AM
Last Post: Larz60+
  IPython console vs Spyder script losc 3 2,910 Apr-30-2020, 04:57 AM
Last Post: deanhystad
  How can I create a multiline input in ipython? DataMower 3 4,533 Oct-28-2019, 08:50 PM
Last Post: DataMower
  creating a variable in a method and using in another method ridgerunnersjw 5 3,125 Oct-04-2019, 04:03 PM
Last Post: buran
  ipython autocomplete broke indentation! Exsul 6 4,833 Aug-20-2019, 01:29 AM
Last Post: Exsul
  Multiprocessing Module Running An Infinite Child Process Even After Completion hsikora 0 4,012 Dec-19-2018, 08:01 AM
Last Post: hsikora
  How to clear IPython console in Spyder? Vai 7 56,579 Aug-20-2018, 09:43 PM
Last Post: james_balcomb
  Stopwatch in Python/IPython shell suvadip 3 4,466 Jul-06-2018, 01:51 PM
Last Post: snippsat
  Subprocess.send_signal, wait until completion plinio 5 9,331 Jun-29-2018, 12:07 PM
Last Post: plinio

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020