DrFloyd5
  • Member for 11 years, 3 months
  • Last seen more than a month ago
Inheritance vs composition: How would you implement an "unordered list"? Subclass of list, or composition?
Accepted answer
6 votes

In Python, we have the built-in list container, which is a mutable sequence. Your new list is not a list according to Liskov. Your list is not a sequence, it is a Multiset otherwise known as a bag. ...

View answer
How to provide error details back to REST request?
2 votes

Checkout the list of HTTP status code. Specifically 206 and 416 - The server is delivering only part of the resource (byte serving) due to a range header sent by the client. The range header is used ...

View answer
Inheritance vs composition: How would you implement an "unordered list"? Subclass of list, or composition?
1 votes

It sounds like going with a single utility method is the way to go. But it should have a name. sorted_equal is named for the implementation. A name like contains_the_same_values puts the emphasis on ...

View answer
Should I use RFC 2119 in interface documentation?
1 votes

You SHOULD. Precise terms are the best way to ensure the communication of an idea is understood. They remove ambiguity that can cause "defects" or can be used as wiggle room when some is ...

View answer