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:
|
try:
|
||||||
readline.read_history_file(history)
|
readline.read_history_file(history)
|
||||||
except IOError:
|
except IOError:
|
||||||
open(history, 'wa').close()
|
open(history, 'a').close()
|
||||||
|
|
||||||
readline.parse_and_bind("tab: complete")
|
readline.parse_and_bind("tab: complete")
|
||||||
|
|
||||||
|
@ -20,7 +20,11 @@
|
|||||||
|
|
||||||
import hy.macros
|
import hy.macros
|
||||||
import hy.compiler
|
import hy.compiler
|
||||||
|
|
||||||
|
try:
|
||||||
import __builtin__
|
import __builtin__
|
||||||
|
except ImportError:
|
||||||
|
import builtins as __builtin__ # Py 3.3
|
||||||
|
|
||||||
|
|
||||||
PATH = [hy.compiler._compile_table,
|
PATH = [hy.compiler._compile_table,
|
||||||
@ -28,7 +32,7 @@ PATH = [hy.compiler._compile_table,
|
|||||||
__builtin__.__dict__]
|
__builtin__.__dict__]
|
||||||
|
|
||||||
|
|
||||||
class Completer:
|
class Completer(object):
|
||||||
def __init__(self, namespace=None):
|
def __init__(self, namespace=None):
|
||||||
if namespace and not isinstance(namespace, dict):
|
if namespace and not isinstance(namespace, dict):
|
||||||
raise TypeError('namespace must be a dictionary')
|
raise TypeError('namespace must be a dictionary')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user