MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / do_study

Method do_study

tests/test_cmd2.py:1519–1524  ·  view source on GitHub ↗

Learn something, with a selection of subjects to choose from.

(self, arg)

Source from the content-addressed store, hash-verified

1517 self.stdout.write(result + "\n")
1518
1519 def do_study(self, arg) -> None:
1520 """Learn something, with a selection of subjects to choose from."""
1521 # Pass in a list of strings for selections
1522 subject = self.select(["math", "science"], "Subject? ")
1523 result = f"Good luck learning {subject}!\n"
1524 self.stdout.write(result)
1525
1526 def do_procrastinate(self, arg) -> None:
1527 """Waste time in your manner of choice."""

Callers

nothing calls this directly

Calls 2

selectMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected