Divya Rani <[email protected]> added the comment:
import cookiejar
cookiejar.is_HDN("foo!bar.com")
Output:
True
cookiejar.is_HDN("woo.com.")
Output:
False
Test cases taken from:
1.
https://github.com/google/guava/blob/581ba1436ebaa54a7f5d0f1db8cc4da0ca72127e/android/guava-tests/test/com/google/common/net/InternetDomainNameTest.java#L81
2.
https://github.com/google/guava/blob/581ba1436ebaa54a7f5d0f1db8cc4da0ca72127e/android/guava-tests/test/com/google/common/net/InternetDomainNameTest.java#L65
----------
nosy: -xtreak
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue35573>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
