MCPcopy Index your code
hub / github.com/python/cpython / print_version

Method print_version

Lib/optparse.py:1586–1595  ·  view source on GitHub ↗

print_version(file : file = stdout) Print the version message for this program (self.version) to 'file' (default stdout). As with print_usage(), any occurrence of "%prog" in self.version is replaced by the current program's name. Does nothing if self.version is emp

(self, file=None)

Source from the content-addressed store, hash-verified

1584 return ""
1585
1586 def print_version(self, file=None):
1587 """print_version(file : file = stdout)
1588
1589 Print the version message for this program (self.version) to
1590 'file' (default stdout). As with print_usage(), any occurrence
1591 of "%prog" in self.version is replaced by the current program's
1592 name. Does nothing if self.version is empty or undefined.
1593 """
1594 if self.version:
1595 print(self.get_version(), file=file)
1596
1597 def format_option_help(self, formatter=None):
1598 if formatter is None:

Callers 1

take_actionMethod · 0.80

Calls 1

get_versionMethod · 0.95

Tested by

no test coverage detected