It's not about lines of code. As Steve Mcconnel and Bob Martin say (two pretty good references on coding best practices),
a method should do one thing and only one thing. However many lines of code it takes to do that one thing is how many lines it should have.
If that "one thing" can be broken into smaller things, each of those should have a method.
Good clues your method is doing more than one thing:
Just to name a few. Bob Martin also says to keep it around 10. Personally I usually try to shoot for 10. If it starts getting close to 20
Really 10 or 20?
I just wrote a method with 80 lines... I can´t post it because it from work, but what this method does basically is navigate through a treewidget, and depending
on the kind of item below or above, it compares that item to the selected one, and as a result it will behave diferently. But anyway, generally speaking,
do try to keep you methods around 10/20 lines, I find it hard to do.
Also, I recently studied at rigging dojo a C++ course, and the tutor, Marco Giodiano who in my opinion is amazing, did quite long functions I believe.
Is C++ another world from Python regarding all this conventions?
thanks
R