• Barry Warsaw's avatar
    bpo-32107 - Improve MAC address calculation and fix test_uuid.py (#4600) · 23df2d13
    Barry Warsaw yazdı
    ``uuid.getnode()`` now preferentially returns universally administered MAC addresses if available, over locally administered MAC addresses.  This makes a better guarantee for global uniqueness of UUIDs returned from ``uuid.uuid1()``.  If only locally administered MAC addresses are available, the first such one found is returned.
    
    Also improve internal code style by being explicit about ``return None`` rather than falling off the end of the function.
    
    Improve the test robustness.
    23df2d13
uuid.rst 9.9 KB