Minor py3.3 fixes
This commit is contained in:
parent
3826a05612
commit
aa3a4e54cd
2
bin/hy
2
bin/hy
@ -120,7 +120,7 @@ def koan_macro(tree):
|
||||
try:
|
||||
readline.read_history_file(history)
|
||||
except IOError:
|
||||
open(history, 'wa').close()
|
||||
open(history, 'a').close()
|
||||
|
||||
readline.parse_and_bind("tab: complete")
|
||||
|
||||
|
@ -20,7 +20,11 @@
|
||||
|
||||
import hy.macros
|
||||
import hy.compiler
|
||||
|
||||
try:
|
||||
import __builtin__
|
||||
except ImportError:
|
||||
import builtins as __builtin__ # Py 3.3
|
||||
|
||||
|
||||
PATH = [hy.compiler._compile_table,
|
||||
@ -28,7 +32,7 @@ PATH = [hy.compiler._compile_table,
|
||||
__builtin__.__dict__]
|
||||
|
||||
|
||||
class Completer:
|
||||
class Completer(object):
|
||||
def __init__(self, namespace=None):
|
||||
if namespace and not isinstance(namespace, dict):
|
||||
raise TypeError('namespace must be a dictionary')
|
||||
|
Loading…
x
Reference in New Issue
Block a user