I am writing a program that creates backup of directories.
Which of the following approach is better for code organization?
Create separate class for Backup and Zip logic -
class BackupUtil: def backup(self): None class ZipUtil: def archive_dir(self): None
Or use function nesting like this -
class BackupUtil: def backup(self): def archive_dir(): None None