Windel Bouwman
583818378b
Add BaseException class
2018-08-22 20:29:47 +02:00
Windel Bouwman
adfd6ad5bb
Merge pull request #72 from RustPython/exceptions
...
Add row and column info to lexer
2018-08-22 19:07:52 +02:00
Windel Bouwman
f595553371
Add location vector to code object
2018-08-22 18:35:32 +02:00
Windel Bouwman
c2550ad3f1
Introduce LocatedStatement after idea from review
2018-08-22 17:49:07 +02:00
Windel Bouwman
fb69804a30
Some formatting
2018-08-22 17:01:54 +02:00
Windel Bouwman
4897e10714
Add location to statement ast type
2018-08-22 16:18:47 +02:00
Windel Bouwman
f6edf876fd
Some formatting
2018-08-22 13:08:07 +02:00
Windel Bouwman
3d9b2360e3
Add row and column info to lexer
2018-08-22 12:14:37 +02:00
Daniel Watkins
a0efee1fc6
Merge pull request #69 from RustPython/floats
...
Add float type
2018-08-21 15:32:39 -04:00
Windel Bouwman
dd273d8278
Merge pull request #68 from RustPython/pyobject
...
Pyobject
2018-08-21 21:16:30 +02:00
Adam Kelly
99829d8903
Use has_attr rather than getattribute for looking up __init__
2018-08-21 08:17:36 +01:00
Windel Bouwman
17a952dbf1
fix #34
2018-08-20 22:06:01 +02:00
Windel Bouwman
20d73d7478
Some formatting
2018-08-20 21:48:58 +02:00
Windel Bouwman
823730f023
Fix cast test snippet
2018-08-20 21:37:21 +02:00
Windel Bouwman
15e274210f
Add float type
2018-08-20 21:22:14 +02:00
Adam Kelly
b3b8048cf7
Fix objtype tests.
2018-08-20 20:00:47 +01:00
Adam Kelly
8b0ba28a36
dict built-in and dict.__new__.
2018-08-20 19:54:19 +01:00
Adam Kelly
483256959a
Trinity of Type, Object and Dict all mutally referential.
2018-08-20 19:54:19 +01:00
Adam Kelly
1884948bb7
Cleanup object type.
2018-08-20 19:54:19 +01:00
Adam Kelly
9f2dac74dc
Create dictionary type
2018-08-20 19:54:19 +01:00
Adam Kelly
29133dd299
Rename objclass -> objobject.
2018-08-20 19:54:19 +01:00
Adam Kelly
61d7c26787
Simplify construction of list and type.
2018-08-20 19:54:19 +01:00
Windel Bouwman
aa963dcbd2
Merge pull request #67 from RustPython/mro
...
Compute Method Resolution Order (MRO).
2018-08-20 20:28:49 +02:00
Adam Kelly
a9c3349943
Specify bases in normal class definitions.
2018-08-19 20:55:37 +01:00
Adam Kelly
456726977e
Comment out broken test snippet.
2018-08-19 20:54:45 +01:00
Adam Kelly
f89b51407f
Compute linearised MRO.
2018-08-19 20:54:45 +01:00
Adam Kelly
110a7ca38c
Add __class__ and __dict__ to type_type.
2018-08-19 20:54:45 +01:00
Adam Kelly
25dc93915a
Add method descriptors and __mro__.
2018-08-19 20:54:45 +01:00
Adam Kelly
6bdf4148b5
Simplify new_list/new_tuple api.
2018-08-19 20:54:45 +01:00
Windel Bouwman
c664fab5b8
Merge pull request #66 from RustPython/type_new
...
Type new
2018-08-19 10:21:15 +02:00
Adam Kelly
ca7b792497
Get both forms of type to work properly.
...
Includes basic ability to traverse method resolution order (mro), but
not to derive mro or read parents from class definitions.
New and init called when creating types and instances.
__call__ works on types and instances.
Descriptors have have priority over instance variables.
2018-08-18 11:54:00 +01:00
Adam Kelly
19b4c704db
set_attr for classes.
2018-08-16 07:46:04 +01:00
Adam Kelly
aa26d55b5a
Add snippet for calling type.
2018-08-16 07:45:02 +01:00
Adam Kelly
79ec7990a8
builtin_build_class should call objtype::new
2018-08-16 07:44:00 +01:00
Windel Bouwman
d8a8e86c22
Merge pull request #65 from RustPython/object
...
Add object class.
2018-08-15 21:31:42 +02:00
Adam Kelly
fd116b7d3f
Add object class.
2018-08-15 17:03:29 +01:00
cthulahoops
66c5f0f96a
Merge pull request #63 from RustPython/list_append
...
Add getattr and hasattr builtins
2018-08-15 16:59:18 +01:00
Windel Bouwman
942d74e9a7
Merge pull request #64 from RustPython/callable_2
...
Callable 2
2018-08-15 17:04:56 +02:00
Windel Bouwman
a7ff8a01bc
Rust formatting
2018-08-15 14:29:01 +02:00
Adam Kelly
68554d8dd2
Refactor to simplify body of invoke.
...
Moves some functionality to objclass, removes call method from PyObject.
2018-08-15 13:04:38 +01:00
Adam Kelly
9917bebb99
Remove unnecessary mutability in DictProtocol.
2018-08-15 12:58:18 +01:00
Adam Kelly
8eee2cec74
Add (broken) callable test.
2018-08-15 12:58:18 +01:00
Adam Kelly
f488843970
Implement __call__
2018-08-15 12:58:18 +01:00
Adam Kelly
eb9d61fbdb
Remove unneeded mutable borrow which causes trace crash.
2018-08-15 12:58:18 +01:00
Windel Bouwman
6854aacf5e
Add builtin chr function
2018-08-15 13:52:08 +02:00
Windel Bouwman
19300496c2
Let len method invoke list __len__ function
2018-08-15 13:32:39 +02:00
Windel Bouwman
a388334c9e
Call vm.get_attribute from getattr
2018-08-15 10:00:47 +02:00
Windel Bouwman
c81e497ace
Add setattr built-in
2018-08-15 00:02:15 +02:00
Windel Bouwman
6444b50a44
Add getattr and hasattr builtins
2018-08-14 23:39:47 +02:00
cthulahoops
2069a4fa82
Merge pull request #62 from RustPython/list_append
...
Register append function to list type
2018-08-14 22:16:11 +01:00