3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 18:31:49 +00:00

Fix unintentional re-import of package z3 in z3printer, in python3. (#5082)

This commit is contained in:
Graydon Hoare 2021-03-06 10:44:07 -08:00 committed by GitHub
parent 8d54e83567
commit e8b3c90e14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,19 @@
#
# Author: Leonardo de Moura (leonardo)
############################################
import sys, io, z3
import sys, io
# We want to import submodule z3 here, but there's no way
# to do that that works correctly on both Python 2 and 3.
if sys.version < '3':
# In Python 2: an implicit-relative import of submodule z3.
# In Python 3: an undesirable import of global package z3.
import z3
else:
# In Python 2: an illegal circular import.
# In Python 3: an explicit-relative import of submodule z3.
from . import z3
from .z3consts import *
from .z3core import *
from ctypes import *