which hot key to do this
Hi Experts,
I'm learning the pycharm, and I visit the http://www.youtube.com/watch?v=PCgHVHhLBFY
I have two question about this video
1) which key to help create "self.name=name" autmatically
def __init__(self,name,description) (which key you pressed to generate below line? )
self.name =name
2)
return self.name + "" + self.description
-------------> (Here, which key you pressed to replace with below line )
return "%s %s" %(self.name,self.description)
sorry for my poor listening english,I can't catch what he said
Lei
I'm learning the pycharm, and I visit the http://www.youtube.com/watch?v=PCgHVHhLBFY
I have two question about this video
1) which key to help create "self.name=name" autmatically
def __init__(self,name,description) (which key you pressed to generate below line? )
self.name =name
2)
return self.name + "" + self.description
-------------> (Here, which key you pressed to replace with below line )
return "%s %s" %(self.name,self.description)
sorry for my poor listening english,I can't catch what he said
Lei
Please sign in to leave a comment.
for the question 1, it some times show "Add field for constructor parameter", but some times not show
for example:
a.if only keep it like
def __init__(self,name,description)
and then I press the alt-enter, it doesn't show "add filed.."
but
b. if it has something like below in pycharm
def __init__(self,name,description)
return True
and then press alt-enter in line "def __init..", it show "add filed for..", and works for me
that's strange for me, I don't know what's wrong here.
==============
for
return self.name + "" + self.description
it never shows me "replace ...."
Doesn't show the intention for me as well. Frankly, I don't know why and if this is by design or a bug. I have filed an issue in YouTrack. You can watch the issue there to be notified about any changes.
Lei