datacamp-logo

Which class has appropriate docstrings?

Option A:

class DataShell:

    A simple class that brings a csv object in-memory as a 
    numpy matrix so you can perform operations on it.

    def __init__(self, filename):
        self.filename = filename

Option B:

class DataShell:
    """
    A simple class that brings a csv object in-memory as a 
    numpy matrix so you can perform operations on it.
    """
    def __init__(self, filename):
        self.filename = filename

Option C:

class DataShell:
    # A simple class that brings a csv object in-memory as a numpy matrix so you can perform operations on it.
    def __init__(self, filename):
        self.filename = filename
Answer the question
50 XP
Possible Answers
  • press
  • press
  • press