From 9fdc2b20a998bbac3eed80595f4be7a001d3e652 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 22 Jul 2019 19:43:21 +0200 Subject: Use print() function in both Python 2 and Python 3 (#722) * Use print() function in both Python 2 and Python 3 Legacy __print__ statements are syntax errors in Python 3 but __print()__ function works as expected in both Python 2 and Python 3. * Fix undefined names --- describe.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'describe.py') diff --git a/describe.py b/describe.py index eb7a0f1c9..636eb5dee 100755 --- a/describe.py +++ b/describe.py @@ -20,6 +20,7 @@ Command-line tool that creates documentation for all APIs listed in discovery. The documentation is generated from a combination of the discovery document and the generated API surface itself. """ +from __future__ import print_function __author__ = 'jcgregorio@google.com (Joe Gregorio)' @@ -354,7 +355,7 @@ def document_api(name, version): try: service = build(name, version) except UnknownApiNameOrVersion as e: - print 'Warning: {} {} found but could not be built.'.format(name, version) + print('Warning: {} {} found but could not be built.'.format(name, version)) return http = build_http() -- cgit v1.2.3