Skip to content

Commit

Permalink
Removed usage of remaining print-as-a-statement
Browse files Browse the repository at this point in the history
print 'as a statement' does not exist any longer in Python 3.
  • Loading branch information
claudep committed Aug 17, 2015
1 parent 6cf876c commit 192bc35
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/developers/styleguide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ Example:
.. code-block:: python
def hello(name):
print 'Hello %s!' % name
print('Hello %s!' % name)
def goodbye(name):
print 'See you %s.' % name
print('See you %s.' % name)
class MyClass(object):
Expand Down
4 changes: 2 additions & 2 deletions docs/formats/base_classes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ what we discussed is related to the above. A quick summary:
of duplicate code in them). Ideally conversion should be as simple as::

>>> po_store = POStore(filecontent)
>>> print str(po_store)
>>> print(str(po_store))
msgid "bleep"
msgstr "blorp"
>>> xliff_store = XliffStore(po_store)
>>> print str(xliff_store)
>>> print(str(xliff_store))
<xliff>
<file>
<trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion translate/storage/mo.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def mounpack(filename='messages.mo'):
"""Helper to unpack Gettext MO files into a Python string"""
f = open(filename)
s = f.read()
print "\\x%02x" * len(s) % tuple(map(ord, s))
print("\\x%02x" * len(s) % tuple(map(ord, s)))
f.close()


Expand Down
4 changes: 2 additions & 2 deletions translate/storage/qm.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def qmunpack(file_='messages.qm'):
"""Helper to unpack Qt .qm files into a Python string"""
f = open(file_)
s = f.read()
print "\\x%02x" * len(s) % tuple(map(ord, s))
print("\\x%02x" * len(s) % tuple(map(ord, s)))
f.close()


Expand Down Expand Up @@ -125,7 +125,7 @@ def parse(self, input):
sectionheader = 5

def section_debug(name, section_type, startsection, length):
print "Section: %s (type: %#x, offset: %#x, length: %d)" % (name, section_type, startsection, length)
print("Section: %s (type: %#x, offset: %#x, length: %d)" % (name, section_type, startsection, length))
return

while startsection < len(input):
Expand Down

0 comments on commit 192bc35

Please sign in to comment.