"import random" doesn't autocomplete in Python Editor (but it works)


#1

Just so you know.
I find the autocomplete handy and when it doesn’t show up it gives the impression that it doesn’t work :wink:


(Pascal Golay) #2

Hi Jorgen - yeah, I see that…
Hmm - looks like it is built in - you can use it without the import statement.

thanks,

-Pascal


#3

Oh, now that sounds like a smart move!
Thanks!


(Steve Baer) #4

That doesn’t sound right


#5

…put it on the wish list please :slight_smile:

Can it be that Pascal just removed the “import random” from his test and ran the script and therefore it was already loaded in memory?


(Steve Baer) #6

Sorry, but absolutely no. Auto importing behind your back is going to cause unexpected behavior. I have no problem adding random to the autocomplete list.

I think that may be the case


#7

I’ll buy that statement in a heartbeat! And would be a fool to argue against (for too many reasons to list here) :smiley:

Thanks!


(Steve Baer) #8

Added to the wishlist at
https://mcneel.myjetbrains.com/youtrack/issue/RH-42934