Skip to content

Commit

Permalink
Tweak comment style
Browse files Browse the repository at this point in the history
  • Loading branch information
mgedmin committed Sep 30, 2015
1 parent 0371b14 commit cc1e164
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions lib/ansible/module_utils/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,31 +69,41 @@
from itertools import repeat

try:
from itertools import imap # Python 2
# Python 2
from itertools import imap
except ImportError:
imap = map # Python 3
# Python 3
imap = map

try:
# Python 2
basestring
except NameError:
basestring = str # Python 3
# Python 3
basestring = str

try:
# Python 2
unicode
except NameError:
unicode = str # Python 3
# Python 3
unicode = str

try:
# Python 2.6+
bytes
except NameError:
bytes = str # Python 2
# Python 2.4
bytes = str

try:
dict.iteritems
except AttributeError:
def iteritems(d): # Python 3
# Python 3
def iteritems(d):
return d.items()
else:
# Python 2
def iteritems(d): # Python 2
return d.iteritems()

Expand Down

0 comments on commit cc1e164

Please sign in to comment.