Hi,

Build.py contains the following code:

    def check_egg(pth):
        """Check if path points to a file inside a python egg file (or to an egg
           directly)."""
        if sys.version_info >= (2,3):
            if os.path.altsep:
                pth = pth.replace(os.path.altsep, os.path.sep)
            components = pth.split(os.path.sep)
            sep = os.path.sep
        else:
            components = pth.replace("\\", "/").split("/")
            sep = "/"
            if is_win:
                sep = "\\"

    [...]

Why not just stripping this down to

    if os.altsep:
        pth = pth.replace(os.altsep, os.sep)
    components = pth.split(os.sep)
    sep = os.sep

Why is there a distinction for Python >= 2.3?
Why is this not using os.sep and os.altsep (instead of os.path.altsep/sep)?

-- 
Schönen Gruß - Regards
Hartmut Goebel
Dipl.-Informatiker (univ.), CISSP, CSSLP

Goebel Consult 
Spezialist für IT-Sicherheit in komplexen Umgebungen
http://www.goebel-consult.de

Monatliche Kolumne: http://www.cissp-gefluester.de/
Goebel Consult mit Mitglied bei http://www.7-it.de

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to