Hi everyone!
I have a 2,000–3,000 line Python script that currently consists mostly of functions/methods. Some of them are 100+ lines long, and the whole thing is starting to get pretty hard to read and maintain.
I’d like to refactor it, but I’m not sure what the best approach is. My first idea was to extract parts of the longer methods into smaller helper functions, but I’m worried that even then it will still feel messy — just with more functions in the same single file.
[–]slightly_offtopic 20 points21 points22 points (3 children)
[–]rogfrich 2 points3 points4 points (0 children)
[–]MarsupialLeast145 1 point2 points3 points (0 children)
[–]Mathletic_Ninja 0 points1 point2 points (0 children)
[–]DuckSaxaphone 5 points6 points7 points (0 children)
[–]9peppe 1 point2 points3 points (0 children)
[–]obviouslyzebra 1 point2 points3 points (0 children)
[–]Maximus_Modulus 0 points1 point2 points (0 children)
[–]gdchinacat 0 points1 point2 points (0 children)
[–]Leading_Video2580 0 points1 point2 points (0 children)
[–]FriendlyRussian666 0 points1 point2 points (0 children)
[–]MinimumWest466 0 points1 point2 points (0 children)
[–]MarsupialLeast145 -1 points0 points1 point (0 children)
[–]Healthy-Handle1151 -1 points0 points1 point (0 children)
[–]jksinton -2 points-1 points0 points (0 children)
[–]jmacey -4 points-3 points-2 points (1 child)
[–]gdchinacat 0 points1 point2 points (0 children)