New answers tagged

0 votes

Should I make a HotelList class?

The purpose of the HotelList class is to get the hotel data from the CSV file and return it as a Python list. You described a function, not a class. Functions do things. Classes merely bind together ...
  • 4,220
4 votes
Accepted

Should I make a HotelList class?

The purpose of the HotelList class is to get the hotel data from the CSV file and return it as a Python list. You are, essentially, describing a repository. One whose data source is a CSV file. So, ...
  • 12.2k
2 votes

Good class design: dependency vs duplication?

You've completely omitted the third (and preferable) approach: call My_Func_Dec::get_rtype - avoids duplication, increases coupling copy the code from My_Func_Dec::get_rtype - increases duplication, ...
  • 12.3k

Top 50 recent answers are included