macaddress
Advanced tools
| Metadata-Version: 1.1 | ||
| Name: macaddress | ||
| Version: 1.1.3 | ||
| Version: 1.2.0 | ||
| Summary: Like ``ipaddress``, but for hardware identifiers such as MAC addresses. | ||
@@ -225,9 +225,11 @@ Home-page: https://github.com/mentalisttraceur/python-macaddress | ||
| >>> mac = macaddress.MAC('01-02-03-04-05-06') | ||
| >>> mac = macaddress.MAC('01-02-03-0A-0B-0C') | ||
| >>> str(mac) | ||
| '01-02-03-04-05-06' | ||
| '01-02-03-0A-0B-0C' | ||
| >>> str(mac).replace('-', ':') | ||
| '01:02:03:04:05:06' | ||
| '01:02:03:0A:0B:0C' | ||
| >>> str(mac).replace('-', '') | ||
| '010203040506' | ||
| '0102030A0B0C' | ||
| >>> str(mac).lower() | ||
| '01-02-03-0a-0b-0c' | ||
@@ -234,0 +236,0 @@ |
+12
-5
@@ -14,3 +14,3 @@ # SPDX-License-Identifier: 0BSD | ||
| ) | ||
| __version__ = '1.1.3' | ||
| __version__ = '1.2.0' | ||
@@ -138,6 +138,7 @@ | ||
| They are equal if they are instances of the same class | ||
| (including one being a subclass of the other), if they | ||
| have the same size, and if their addresses are equal. | ||
| They are equal if they are instances of the same class, | ||
| have the same size, and their addresses are equal. | ||
| """ | ||
| if not isinstance(other, HWAddress): | ||
| return NotImplemented | ||
| if not isinstance(other, type(self)) or self.size != other.size: | ||
@@ -149,2 +150,4 @@ return False | ||
| """Check if this hardware address is not equal to another.""" | ||
| if not isinstance(other, HWAddress): | ||
| return NotImplemented | ||
| if not isinstance(other, type(self)) or self.size != other.size: | ||
@@ -193,3 +196,7 @@ return True | ||
| def __hash__(self): | ||
| """Get the hash of this hardware address.""" | ||
| return hash((type(self), self._address)) | ||
| def _aligned_address_integers(address1, address2): | ||
@@ -321,3 +328,3 @@ size1 = address1.size | ||
| This lets you can just write | ||
| This lets you just write | ||
@@ -324,0 +331,0 @@ address = hwaddress.parse(user_input, EUI64, EUI48, ...) |
+7
-5
| Metadata-Version: 1.1 | ||
| Name: macaddress | ||
| Version: 1.1.3 | ||
| Version: 1.2.0 | ||
| Summary: Like ``ipaddress``, but for hardware identifiers such as MAC addresses. | ||
@@ -225,9 +225,11 @@ Home-page: https://github.com/mentalisttraceur/python-macaddress | ||
| >>> mac = macaddress.MAC('01-02-03-04-05-06') | ||
| >>> mac = macaddress.MAC('01-02-03-0A-0B-0C') | ||
| >>> str(mac) | ||
| '01-02-03-04-05-06' | ||
| '01-02-03-0A-0B-0C' | ||
| >>> str(mac).replace('-', ':') | ||
| '01:02:03:04:05:06' | ||
| '01:02:03:0A:0B:0C' | ||
| >>> str(mac).replace('-', '') | ||
| '010203040506' | ||
| '0102030A0B0C' | ||
| >>> str(mac).lower() | ||
| '01-02-03-0a-0b-0c' | ||
@@ -234,0 +236,0 @@ |
+6
-4
@@ -217,9 +217,11 @@ macaddress | ||
| >>> mac = macaddress.MAC('01-02-03-04-05-06') | ||
| >>> mac = macaddress.MAC('01-02-03-0A-0B-0C') | ||
| >>> str(mac) | ||
| '01-02-03-04-05-06' | ||
| '01-02-03-0A-0B-0C' | ||
| >>> str(mac).replace('-', ':') | ||
| '01:02:03:04:05:06' | ||
| '01:02:03:0A:0B:0C' | ||
| >>> str(mac).replace('-', '') | ||
| '010203040506' | ||
| '0102030A0B0C' | ||
| >>> str(mac).lower() | ||
| '01-02-03-0a-0b-0c' | ||
@@ -226,0 +228,0 @@ |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
44310
0.9%346
1.76%