diff options
| author | Martin <martin.basti@gmail.com> | 2016-07-02 03:28:47 +0200 |
|---|---|---|
| committer | Martin <martin.basti@gmail.com> | 2016-07-02 03:28:47 +0200 |
| commit | b0f40d97f1d87cff92dc5072e8ac28895e5f17c4 (patch) | |
| tree | e134d93e48c21a8cdf35d69809dd7690e77eadb6 /examples/name.py | |
| parent | ff21c89d70b254027d647c4d8eb83cc1e3954c8b (diff) | |
| download | dnspython-b0f40d97f1d87cff92dc5072e8ac28895e5f17c4.tar.gz | |
Pylint: examples: do py2/3 compatible prints
Diffstat (limited to 'examples/name.py')
| -rwxr-xr-x | examples/name.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/examples/name.py b/examples/name.py index b099c49..7bb0c01 100755 --- a/examples/name.py +++ b/examples/name.py @@ -1,13 +1,15 @@ #!/usr/bin/env python +from __future__ import print_function + import dns.name n = dns.name.from_text('www.dnspython.org') o = dns.name.from_text('dnspython.org') -print n.is_subdomain(o) # True -print n.is_superdomain(o) # False -print n > o # True -rel = n.relativize(o) # rel is the relative name www +print(n.is_subdomain(o)) # True +print(n.is_superdomain(o)) # False +print(n > o) # True +rel = n.relativize(o) # rel is the relative name www n2 = rel + o -print n2 == n # True -print n.labels # ['www', 'dnspython', 'org', ''] +print(n2 == n) # True +print(n.labels) # ['www', 'dnspython', 'org', ''] |
