RE: RE:
You are viewing a single comment's thread from:

RE:

Words
85
Reading
1 min
Listen
Play
3y

Let's say you have a comment that says "# Calculate age of data entry (in minutes)" and then a code block that proceeds to do that. Instead you can extract that code block into its own method called "def calculate_age_of_data_entry_in_minutes(data)". Not only does that make the original code block more readable by making it shorter, it also allows the 'calculate_age_of_data_entry_in_minutes' block to be called by other methods in the future, just in case they need to calculate the age of data entries as well.
#sbi-skip

@samuel-swinton: Let's say you | Ecency