Implement the type builtin better and with a lot more tests.

This commit is contained in:
Dave Halter
2015-07-01 14:27:49 +02:00
parent 80492265cf
commit e222a30227
3 changed files with 27 additions and 2 deletions

View File

@@ -35,6 +35,25 @@ next(open(''))
#? ['__itemsize__']
tuple.__itemsize__
# type
#? int
type(1)
#? int
type(int())
#? type
type(int)
#? type
type(type)
#? list
type([])
def x():
yield 1
generator = type(x())
#? generator
type(x for x in [])
# -----------------
# re
# -----------------