• Tim Peters's avatar
    Remove the horrid generators hack from doctest.py. This relies on a · 4fd9e2fc
    Tim Peters yazdı
    somewhat less horrid hack <wink>:  if a module does
        from __future__ import X
    then the module dict D is left in a state such that (viewing X as a
    string)
        D[X] is getattr(__future__, X)
    So by examining D for all the names of future features, and making that
    test for each, we can make a darned good guess as to which future-features
    were imported by the module.  The appropriate flags are then sucked out
    of the __future__ module, and passed on to compile()'s new optional
    arguments (PEP 264).
    
    Also gave doctest a meaningful __all__, removed the history of changes
    (CVS serves that purpose now), and removed the __version__ vrbl (similarly;
    before CVS, it was a reasonable clue, but not anymore).
    4fd9e2fc
doctest.py 34.5 KB