diff options
| author | Bob Halley <halley@dnspython.org> | 2022-03-15 08:37:20 -0700 |
|---|---|---|
| committer | Bob Halley <halley@dnspython.org> | 2022-03-15 08:37:20 -0700 |
| commit | b1d2332687adbecc0acbb4e623124f783f859d9e (patch) | |
| tree | 5318d5ecc0dd35e0a6922380cd60f9d9caa9ad34 /examples/name.py | |
| parent | 08f8bde64e8679d5e4f0b129292461de152ba32b (diff) | |
| download | dnspython-b1d2332687adbecc0acbb4e623124f783f859d9e.tar.gz | |
black autoformatting
Diffstat (limited to 'examples/name.py')
| -rwxr-xr-x | examples/name.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/name.py b/examples/name.py index 614fdbc..ff687e8 100755 --- a/examples/name.py +++ b/examples/name.py @@ -2,12 +2,12 @@ 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 +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 n2 = rel + o -print(n2 == n) # True -print(n.labels) # ['www', 'dnspython', 'org', ''] +print(n2 == n) # True +print(n.labels) # ['www', 'dnspython', 'org', ''] |
